[Xorp-cvs] XORP cvs commit: xorp/policy/backend xorp/policy/test
Bruce M Simpson
bms@spc.org
Wed, 17 Aug 2005 12:11:48 +0100
On Wed, Aug 17, 2005 at 08:44:46AM +0000, Atanu Ghosh wrote:
> Log message:
> Regenerate the lex files with the version of flex on FreeBSD 4.10 to
> prevent the "error: "__unused" redefined problem on Mac OS X.
We need to change the yy template file used to generate the parser, if future
regenerations are to build automatically under Windows without further changes.
Specifically what's needed is:-
- Don't include FreeBSD's <sys/cdefs.h> on non-FreeBSD platforms.
[This is where the __unused definition originally came from; it's
been manually hacked in in certain revisions of these generated files
in Perforce history]
...which has been dealt with by this commit. Thanks!
- Defines for fileno() and isatty() to use the underscore-prefixed
versions of those routines in the Microsoft Visual C++ Runtime.
[We compile with -D_NO_OLDNAMES in order to catch possibly erroneous
or non-portable use of certain UNIX C library functions on Windows.
The errors thus generated are useful to people trying to hack XORP
on platforms which the core project doesn't currently support.]
- Embrace #include "config.h" with #ifdef HAVE_CONFIG_H
[Future proofing against other ways of building XORP failing if
we ditch autotools, e.g. Jam/OS X ProjectBuilder, pmake, etc., i.e.
if we build in a configuration with no config.h. ]
Regards,
BMS