home *** CD-ROM | disk | FTP | other *** search
- Submitted-by: srini@hpcuhe.cup.hp.com (Sreenivasa Rao Tellakula)
-
- I have a doubt on _POSIX_SOURCE.
-
- If I have two prototypes for the same function, one is posix version
- and one is non-posix and if I have to put them in the header file, what
- ifdef I have to use? Can I use _POSIX_SOURCE?
-
- For example:
-
- in example.h
-
- #ifdef _POSIX_SOURCE
- extern int getgroups (int, gid_t *);
- #else
- extern int getgroups (int *, int *);
- #endif
-
- is the above segment correct? If correct, this means all posix programs
- needs to be compiled with cc -D_POSIX_SOURCE and is this an acceptable
- constraint?
-
- Whatever flags one has to specify with 'cc' to get a posix compliant
- program is implementaion defined or is there any posix specification on
- that?
-
-
- --
- srini@cup.hp.com
- (408)447-4199(W)
- (408)447-5039 - Fax
-
- Volume-Number: Volume 34, Number 13
-
-