|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
Re: [PLUG] OT: C question: anyone know what a SunOS box defines?
|
> To find SIOCGIFFLAGS and friends, I've done this in the past:
>
> #include <sys/ioctl.h>
>
> #ifndef __OpenBSD__
> #include <net/if.h> /* work around OpenBSD double include bug */
> #endif
>
> #ifndef SIOCGIFCONF
> #include <sys/sockio.h> /* Solaris, maybe others? */
> #endif
>
> If you want an #ifdef that will identify Solaris systems, try:
>
> #if defined (__SVR4) && defined (__sun)
Thanks, I've already got the net/if.h one...but not the others, and _thank_
_you_ for the solaris checker...
> Also:
>
> gcc -E -dM - < /dev/null
>
> Is useful for seeing what #define's gcc is setting for you on various
> architectures.
Geez, that's nice to know!
Thanks again,
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
|
|