Stephen Gran on 26 Jul 2006 17:38:31 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Linux Port


On Wed, Jul 26, 2006 at 09:48:53AM -0700, Daniel K. Spicer said:
> I'm doing a code port from Solaris to Suse Linux. The ported code will
> need to run on both so I need a preproccessor directive in the .c
> files like:
> 
> #ifdef SUSE 
> ...Linux code 
> #else 
> ...Solaris code 
> #endif
>
> I'm using gcc. Does anyone know of an existing macro for Suse or
> Solaris to do this with?  Or another good way of doing it?

There is __linux__ and __sun__ available, if you are using gcc of a
recentish version.

HTH,
-- 
 --------------------------------------------------------------------------
|  Stephen Gran                  | Absence makes the heart forget.         |
|  steve@lobefin.net             |                                         |
|  http://www.lobefin.net/~steve |                                         |
 --------------------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug