TuskenTower on 26 Jul 2006 17:43:17 -0000 |
On 7/26/06, Dan Crosta <dcrosta@sccs.swarthmore.edu> wrote: Daniel K. Spicer wrote: > 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? > > Thanks, > -Dan
As long as you're not doing anything funny at the bit level (where ordering matters) your code will cross compile simply. Shared memory is done differently on all platforms (at least I don't remember using the same code on each). For your network stuff, make sure to use ntohl and htonl (and shorts). HTH Amul ___________________________________________________________________________ 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
|
|