S_ISSOCK() and friends
- From: fraioli dg-rtp dg com (Marc J. Fraioli)
- To: gnome-list gnome org
- Subject: S_ISSOCK() and friends
- Date: Tue, 5 Jan 1999 16:27:45 -0500 (EST)
Compile of gnome-libs is failing on DG/UX because S_ISSOCK() is
undefined. I know the fix is easy, but was thinking about what might
be the best way to approach it. With a few years of experience with a
fair number of UNIX variants under my belt, I have seen that the subset
of these type of macros that each UNIX implements seems to be rather
random, for some reason. Perhaps we should have a fairly general
configuration solution that deals with all of these (or at least all
that Gnome uses). gnome-libs/libgnome/gnome-magic.c uses S_ISREG,
S_ISDIR, S_ISCHR, S_ISBLK, S_ISFIFO, and S_ISSOCK. I was thinking that
the obvious answer was just to stick a few lines like:
#ifndef S_ISSOCK
#define S_ISSOCK(x) ((x & S_IFMT) == S_IFSOCK)
#endif
somewhere.
But it occurs to me that some platform somewhere could concievably
provide these as actual functions, not macros, and this could be
troublesome. Does anyone think that's worth worrying about? And
what would be the best place to provide these? gnomesupport.h?
Straight into the (currently only one) module that uses them?
Marc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]