[Click] Configure and timespec

Roberto Riggio roberto.riggio at create-net.org
Thu Oct 14 09:16:17 EDT 2010


  Hi,

this is not actually creating any problem to me. I'm reporting it just 
in case it may
prove useful. Lurking in the configure.log, I've found the following error:

configure:7464: checking for struct timespec
configure:7464: g++ -W -Wall  -c -g -O2  conftest.cpp >&5
configure:7464: $? = 0
configure:7464: g++ -W -Wall  -c -g -O2  conftest.cpp >&5
conftest.cpp: In function 'int main()':
conftest.cpp:101: error: expected primary-expression before 'struct'
conftest.cpp:101: error: expected ')' before 'struct'
conftest.cpp:102: error: expected ')' before ';' token
conftest.cpp:102: error: expected ')' before ';' token
conftest.cpp:102: warning: suggest braces around empty body in an 'if' 
statement
configure:7464: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "click"
| #define PACKAGE_TARNAME "click"
| #define PACKAGE_VERSION "1.8.0"
| #define PACKAGE_STRING "click 1.8.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define CLICK_VERSION "1.8.0"
| #define CLICK_VERSION_CODE CLICK_MAKE_VERSION_CODE(1,8,0)
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_NEW_HDR 1
| #define NUM_CLICK_CPUS 1
| #define HAVE_CLICKFS 1
| #define LINUX_SRCDIR "NONE"
| #define FREEBSD_INCLUDEDIR "/usr/include"
| #define HAVE_STRERROR 1
| #define HAVE_RANDOM 1
| #define HAVE_SNPRINTF 1
| #define HAVE_STRNLEN 1
| #define HAVE_STRTOUL 1
| #define HAVE_TCGETPGRP 1
| #define HAVE_VSNPRINTF 1
| #define SIZEOF_INT 4
| #define SIZEOF_LONG 4
| #define SIZEOF_SIZE_T 4
| #define SIZEOF_VOID_P 4
| #define HAVE_INTTYPES_H 1
| #define HAVE_INDIFFERENT_ALIGNMENT 1
| #define SIZEOF_LONG_LONG 8
| #define HAVE_LONG_LONG 1
| #define HAVE_INT64_T 1
| #define HAVE_UINT64_T 1
| #define HAVE_INT64_TYPES 1
| #define HAVE_INT64_IS_LONG_LONG_USERLEVEL 1
| #define HAVE_ENDIAN_H 1
| #define CLICK_BYTE_ORDER 1234
| #define HAVE_BYTESWAP_H 1
| #define HAVE_ARITHMETIC_RIGHT_SHIFT 1
| #define HAVE_ADDRESSABLE_VA_LIST 1
| #define HAVE___BUILTIN_CLZ 1
| #define HAVE___BUILTIN_CLZL 1
| #define HAVE___BUILTIN_CLZLL 1
| #define HAVE___BUILTIN_FFS 1
| #define HAVE___BUILTIN_FFSL 1
| #define HAVE___BUILTIN_FFSLL 1
| #define HAVE___SYNC_SYNCHRONIZE 1
| #define HAVE_STRINGS_H 1
| #define HAVE_FFS 1
| #define HAVE_FFSL 1
| #define HAVE_FFSLL 1
| #define HAVE_TIME_H 1
| #define SIZEOF_STRUCT_TIMEVAL 8
| /* end confdefs.h.  */
| #include <stdio.h>
| #ifdef HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #ifdef HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #ifdef STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # ifdef HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #ifdef HAVE_STRING_H
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #ifdef HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #ifdef HAVE_INTTYPES_H
| # include <inttypes.h>
| #endif
| #ifdef HAVE_STDINT_H
| # include <stdint.h>
| #endif
| #ifdef HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| int
| main ()
| {
| if (sizeof ((struct timespec)))
|         return 0;
|   ;
|   return 0;
| }
configure:7464: result: yes

It looks like albeit the compilation fails, the configure reports that 
timespec
is actually available.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log
Type: text/x-log
Size: 109134 bytes
Desc: not available
Url : http://amsterdam.lcs.mit.edu/pipermail/click/attachments/20101014/1d3be569/attachment-0001.bin 


More information about the click mailing list