* Michael Fischer (michael@visv.net) [20021115 08:02]:
I am developing an app under SuSE 7.1 at work, and discovered that in order to get mmap(2) with MAP_ANON, I had to #define __USE_MISC. (I peeked in
)
That's the wrong way to do it, as you should never define __USE* directly. Look at /usr/include/features.h and you'll see the things you should define to get the __USE* defined. __USE_MISC is defined if you define either _BSD_SOURCE or _SVID_SOURCE.
but I wonder why glibc was not compiled (on linux) to have this (if that's the right way to phrase it).
The features of glibc are defined in differing standards and glibc allows
you to write code for specific environments by letting you controll what
gets defined/declared. And you use things outside the scope of standard C89,
you have to explicitely ask for it.
--
Philipp Thomas