argus-clients-3.0.0.rc.6.tar.gz and Mac OS 10.3

Peter Van Epp vanepp at sfu.ca
Thu Jun 15 11:23:45 EDT 2006


	Well this one has me stumped. Something appears to be typdefing
u_int16_t to uint16_t which isn't defined causing the parse error below.
It is correct in /usr/include/netinet/in_systm.h which seems to be what gets
included, but by the time it is post processed its wrong (and uint16_t doesn't
appear any where else in the preprocessor output so I don't see how the change
is getting made):

/usr/include/netinet/in_systm.h
...
 * Network types.
 * 
 * Internally the system keeps counters in the headers with the bytes
 * swapped so that VAX instructions will work on them.  It reverses 
 * the bytes before transmission at each protocol level.  The n_ types
 * represent the types with the bytes in ``high-ender'' order.
 */
typedef u_int16_t n_short;              /* short as received from the net */
typedef u_int32_t n_long;               /* long as received from the net */
 
typedef u_int32_t n_time;               /* ms since 00:00 GMT, byte rev */
... 

gcc -O3 -I. -I../include  -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DARGUS_THREADS=1 -DHAVE_TCP_WRAPPER=1 -DHAVE_SYS_SOCKIO_H=1 -DHAVE_STRING_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 -DHAVE_STRTOF=1 -DHAVE_DARWIN=1 -DSTDC_HEADERS=1  -DARGUS_SYSLOG -c ./argus_main.c
In file included from ../include/argus_util.h:34,
                 from argus_main.c:73:
/usr/include/netinet/in_systm.h:75: error: parse error before "n_short"
/usr/include/netinet/in_systm.h:76: error: parse error before "n_long"
/usr/include/netinet/in_systm.h:78: error: parse error before "n_time"
In file included from ../include/argus_util.h:35,
                 from argus_main.c:73:
/usr/include/netinet/ip.h:178: error: parse error before "n_long"
/usr/include/netinet/ip.h:181: error: parse error before "n_long"
/usr/include/netinet/ip.h:183: error: parse error before '}' token
/usr/include/netinet/ip.h:184: error: parse error before '}' token
In file included from /usr/include/mach/mach_types.h:64,
                 from /usr/include/pthread.h:66,
                 from ../include/argus_util.h:37,
                 from argus_main.c:73:
/usr/include/gcc/darwin/3.3/stdint.h:34: error: parse error before "uint8_t"
/usr/include/gcc/darwin/3.3/stdint.h:35: error: parse error before "uint16_t"
/usr/include/gcc/darwin/3.3/stdint.h:36: error: parse error before "uint32_t"
/usr/include/gcc/darwin/3.3/stdint.h:45: error: parse error before "uint_least8_t"
/usr/include/gcc/darwin/3.3/stdint.h:46: error: parse error before "uint_least16_t"
/usr/include/gcc/darwin/3.3/stdint.h:47: error: parse error before "uint_least32_t"
/usr/include/gcc/darwin/3.3/stdint.h:56: error: parse error before "uint_fast8_t"
/usr/include/gcc/darwin/3.3/stdint.h:57: error: parse error before "uint_fast16_t"
/usr/include/gcc/darwin/3.3/stdint.h:58: error: parse error before "uint_fast32_t"
In file included from /usr/include/mach/memory_object_types.h:68,
                 from /usr/include/mach/mach_types.h:71,
                 from /usr/include/pthread.h:66,
                 from ../include/argus_util.h:37,
                 from argus_main.c:73:
/usr/include/mach/vm_types.h:57: error: parse error before "reg64_t"
/usr/include/mach/vm_types.h:64: error: parse error before "ppnum_t"
In file included from /usr/include/mach/mach_types.h:79,
                 from /usr/include/pthread.h:66,
                 from ../include/argus_util.h:37,
                 from argus_main.c:73:
/usr/include/mach/thread_policy.h:154: error: parse error before "uint32_t"
/usr/include/mach/thread_policy.h:156: error: parse error before "constraint"
/usr/include/mach/thread_policy.h:158: error: parse error before '}' token
In file included from ../include/argus_util.h:68,
                 from argus_main.c:73:
/usr/include/netinet/ip_icmp.h:86: error: parse error before "n_short"
/usr/include/netinet/ip_icmp.h:93: error: parse error before "n_short"
/usr/include/netinet/ip_icmp.h:102: error: parse error before '}' token
/usr/include/netinet/ip_icmp.h:115: error: parse error before "n_time"
/usr/include/netinet/ip_icmp.h:117: error: parse error before "its_ttime"
/usr/include/netinet/ip_icmp.h:126: error: parse error before '}' token
/usr/include/netinet/ip_icmp.h:134: error: parse error before '}' token
make[1]: *** [argus_main.o] Error 1

But by the time it is post processed its wrong (and there is no previous 
reference to uint16_t in the preprocessor output file to tell me where its
getting it. I'd expect a typedef somewhere else):

# 1 "/usr/include/netinet/in_systm.h" 1 3 4
# 75 "/usr/include/netinet/in_systm.h" 3 4
typedef uint16_t n_short;
typedef uint32_t n_long;

2.0.6 on the same machine works correctly:


# 1 "/usr/include/netinet/in_systm.h" 1 3 4
# 75 "/usr/include/netinet/in_systm.h" 3 4
typedef u_int16_t n_short;
typedef u_int32_t n_long;

Suggestions? Hopefully someone will say "Oh you need to include <blat> :-) but
I currently can't see nor find the value of <blat>.

Peter Van Epp / Operations and Technical Support 
Simon Fraser University, Burnaby, B.C. Canada



More information about the argus mailing list