Kyle R . Burton on Thu, 20 Jun 2002 21:00:37 +0200


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

[PLUG] OT: C question: anyone know what a SunOS box defines?


  bash-2.02$ uname -a
  SunOS xxxxxx 5.7 Generic_106541-20 sun4m sparc SUNW,SPARCstation-20

I'm trying to build some C/C++ code that makes use of networking.
So far I've identified 2 differences for this host os: AF_INET6 is not
defined in the networking header files (grrr...), and SIOCGIFFLAGS 
(SIOCGIFCONF and SIOCGIFADDR) is in sys/sockio.h (which also happens to be
available through ioctl.h).

I'm using:

  #if defined __OpenBSD__ || defined __FreeBSD__ || defined __NetBSD__

For some of the *BSD/Linux differences, but I don't know what I should be
using for the SunOS box...anyone know what the C compiler on this thing
will define so the code can #if/#else/#endif the code in question?  Or
should I just #include ioctl.h to get the SIOCGI* defines?

Hrm...maybe that's what I should be doing.

Kyle

-- 

------------------------------------------------------------------------------
Wisdom and Compassion are inseparable.
        -- Christmas Humphreys
mortis@voicenet.com                            http://www.voicenet.com/~mortis
------------------------------------------------------------------------------

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