[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Error with -ansi command line flag.
From: |
William R. Buckley |
Subject: |
Error with -ansi command line flag. |
Date: |
Thu, 17 May 2001 20:52:30 -0700 |
I have posted a message on gcc newsgroups but, have had no answer for
several
weeks. I am hoping someone here has seen this problem, and solved it.
On RH6.2, using gcc v egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
with parameter -ansi, I get compilation errors with the NET-SNMP file
ucd-snmp/asn1.h at line 40. If I compile without the -ansi flag,
there
is no error. What happens is that u_long is not defined, so the error
reports the phrase "parse error before 'oid'", which is the compilers
way of saying that the token prior to 'oid' is not understood, and so
there is an apparent syntax error in the line of code.
Now, I have looked at the file sys/types.h, and it includes
typedef __u_long u_long
and bits/types.h includes
typedef unsigned long __u_long
and sys/types.h relies upon the defined label
__USE_BSD
to include or exclude the conversion from the bits/types.h
definition to the form u_long.
What I don't understand is why the command line option -ansi
should result in u_long becoming undefined.
Any clues?
William R. Buckley
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Error with -ansi command line flag.,
William R. Buckley <=