David Collier-Brown - Sun Canada
davecb at scot.canada.sun.com
Mon Apr 10 15:36:03 GMT 2000
Michael Tokarev <mjt at tls.msk.ru> wrote:
| * EOL Alert - The following non-prefixed test macros are
| * here for backward compatability, and will be not be present
| * in future releases - use the NIS_*() macros above.
| #define WORLD(a, m) (((a) & (m)) != 0)
| #define GROUP(a, m) (((a) & ((m) << 8)) != 0)
| #define OWNER(a, m) (((a) & ((m) << 16)) != 0)
| #define NOBODY(a, m) (((a) & ((m) << 24)) != 0)
Aha! Thanks, I'd just found that.
This code is in the process of being phased out,
and in principle should disappear in 64-bit Solaris.
I'm mildly surprised it hasn't.
To make the code never have to change again, first
seperate the includes used by the two modules
(a sane but labourious task, and one which makes
other programs survive the bug), and then say:
#ifdef NIS_WORLD /* Use newer form if it's available. */
# undef WORLD
# undef GROUP
#define NIS_WORLD WORLD
This approach is independant of OS vendor and version...
A hacky workaround is to switch to the new defines,
with the NIS_WORLD macros, and #undef WORLD etc
right after the include. I don't reccomend that!
I'm surprised they're still around: I'll make a note
to look them up in bugtraq when I get back to Toronto
and add affected people to the notification list.
Affected people, send me email.
They're not used in 2.0.7, luckily!
David Collier-Brown in Boston
Phone: (781) 442-0734, Room BUR03-3632
More information about the samba-technical