From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Schwab To: obrien AT NUXI.com Cc: Zack Weinberg , rittle AT rsch.comm.mot.com, morganw AT engr.sc.edu, rth AT cygnus.com, gcc AT gcc.gnu.org, pfeifer AT dbai.tuwien.ac.at Subject: Re: FreeBSD 4.0 Date: Wed, 15 Sep 1999 01:21:00 -0000 Message-id: References: <199909150533.AAA14241@latour.rsch.comm.mot.com> <199909150601.XAA22053@zack.bitmover.com> <19990914231414.B17808@dragon.nuxi.com> <199909150726.AAA31243@zack.bitmover.com> <19990915005633.A25121@relay.nuxi.com> X-SW-Source: 1999-09/msg00592.html "David O'Brien" writes: |> > Is there any macro which is defined by all 4.4-derived systems? |> |> #if (defined(__unix__) || defined(unix)) && !defined(USG) ^^^^ ^^^ |> #include |> #endif |> |> to detect if the code is being compiled on a 4.3 Net2 code base or |> newer (e.g. FreeBSD 1.x, 4.3/Reno, NetBSD 0.9, 386BSD, BSD/386 1.1 and |> below). |> |> #if (defined(BSD) && (BSD >= 199103)) ^^^ ^^^ |> |> to detect if the code is being compiled on a 4.4 code base or newer |> (e.g. FreeBSD 2.x, 4.4, NetBSD 1.0, BSD/386 2.0 or above). |> |> #if (defined(BSD) && (BSD >= 199306)) ^^^ ^^^ GCC cannot use any of the marked identifiers because they are in the application's namespace. Andreas. -- Andreas Schwab "And now for something schwab@suse.de completely different." SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Schwab To: obrien@NUXI.com Cc: Zack Weinberg , rittle@rsch.comm.mot.com, morganw@engr.sc.edu, rth@cygnus.com, gcc@gcc.gnu.org, pfeifer@dbai.tuwien.ac.at Subject: Re: FreeBSD 4.0 Date: Thu, 30 Sep 1999 18:02:00 -0000 Message-ID: References: <199909150533.AAA14241@latour.rsch.comm.mot.com> <199909150601.XAA22053@zack.bitmover.com> <19990914231414.B17808@dragon.nuxi.com> <199909150726.AAA31243@zack.bitmover.com> <19990915005633.A25121@relay.nuxi.com> X-SW-Source: 1999-09n/msg00592.html Message-ID: <19990930180200.1JaGpgNwc4IuEzi4pACtnSWce3q4jyVLZaHzPfnTQZA@z> "David O'Brien" writes: |> > Is there any macro which is defined by all 4.4-derived systems? |> |> #if (defined(__unix__) || defined(unix)) && !defined(USG) ^^^^ ^^^ |> #include |> #endif |> |> to detect if the code is being compiled on a 4.3 Net2 code base or |> newer (e.g. FreeBSD 1.x, 4.3/Reno, NetBSD 0.9, 386BSD, BSD/386 1.1 and |> below). |> |> #if (defined(BSD) && (BSD >= 199103)) ^^^ ^^^ |> |> to detect if the code is being compiled on a 4.4 code base or newer |> (e.g. FreeBSD 2.x, 4.4, NetBSD 1.0, BSD/386 2.0 or above). |> |> #if (defined(BSD) && (BSD >= 199306)) ^^^ ^^^ GCC cannot use any of the marked identifiers because they are in the application's namespace. Andreas. -- Andreas Schwab "And now for something schwab@suse.de completely different." SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg