Re: [q-lang-users] [qlist] Re: Good news, everyone!
Brought to you by:
agraef
From: Andrew B. <and...@ya...> - 2006-12-19 07:14:16
|
I'm currently running Mac OS X Version 10.4.8 Ok, from the man page: -------------------------------- SETPGID(2) BSD System Calls Manual SETPGID(2) NAME setpgid, setpgrp -- set process group SYNOPSIS #include <unistd.h> int setpgid(pid_t pid, pid_t pgrp); int setpgrp(pid_t pid, pid_t pgrp); DESCRIPTION Setpgid() sets the process group of the specified process pid to the specified pgrp. If pid is zero, then the call applies to the current process. -------------------------------- ...which would support your claims. On the other hand, looking at 'unistd.h', I find: -------------------------------- 448 #if __DARWIN_UNIX03 449 pid_t setpgrp(void) __DARWIN_ALIAS(setpgrp); 450 #else /* !__DARWIN_UNIX03 */ 451 int setpgrp(pid_t pid, pid_t pgrp); /* obsoleted by setpgid() */ 452 #endif /* __DARWIN_UNIX03 */ -------------------------------- ...at which point I quit following. It appears that __DARWIN_UNIX03 is being set in 'sys/cdefs.h', but I wouldn't bet money on that. The relavant lines: -------------------------------- 211 /* 212 * The __DARWIN_ALIAS macros is used to do symbol renaming, 213 * they allow old code to use the old symbol thus maintiang binary 214 * compatability while new code can use a new improved version of the 215 * same function. 216 * 217 * By default newly complied code will actually get the same symbols 218 * that the old code did. Defining any of _APPLE_C_SOURCE, _XOPEN_SOURCE, 219 * or _POSIX_C_SOURCE will give you the new symbols. Defining _XOPEN_SOURCE 220 * or _POSIX_C_SOURCE also restricts the avilable symbols to a subset of 221 * Apple's APIs. 222 * 223 * __DARWIN_ALIAS is used by itself if the function signature has not 224 * changed, it is used along with a #ifdef check for __DARWIN_UNIX03 225 * if the signature has changed. Because the __LP64__ enviroment 226 * only supports UNIX03 sementics it causes __DARWIN_UNIX03 to be 227 * defined, but causes __DARWIN_ALIAS to do no symbol mangling. 228 */ 229 230 #if !defined(__DARWIN_UNIX03) 231 #if defined(_APPLE_C_SOURCE) || defined(_XOPEN_SOURCE) || defined(_POSIX_C_SOURCE) || defined(__LP64__) 232 #if defined(_NONSTD_SOURCE) 233 #error "Can't define both _NONSTD_SOURCE and any of _APPLE_C_SOURCE, _XOPEN_SOURCE, _POSIX_C_SOURCE, or __LP64__" 234 #endif /* _NONSTD_SOURCE */ 235 #define __DARWIN_UNIX03 1 236 #elif defined(_NONSTD_SOURCE) 237 #define __DARWIN_UNIX03 0 238 #else /* default */ 239 #define __DARWIN_UNIX03 0 240 #endif /* _APPLE_C_SOURCE || _XOPEN_SOURCE || _POSIX_C_SOURCE || __LP64__ */ 241 #endif /* !__DARWIN_UNIX03 */ 242 243 #if __DARWIN_UNIX03 && !defined(__LP64__) 244 #define __DARWIN_ALIAS(sym) __asm("_" __STRING(sym) "$UNIX2003") 245 #else 246 #define __DARWIN_ALIAS(sym) 247 #endif -------------------------------- Anyhow, I have no idea if this helps at all. If you remember my silly little post from about a month ago: "Years ago, when I was young and idealistic I would worry about how stuff was "supposed" to work. Now I just look in the header files and try to figure out what _will_ work." -andrew On 16 Dec 2006, at 18:42, Albert Graef wrote: > Andrew Berg wrote: >> +#ifdef __APPLE__ >> +/* Need to undef _POSIX_C_SOURCE to get AF_LOCAL defined. */ >> +#undef _POSIX_C_SOURCE >> +#endif > > Ok, this is in cvs now. > >> +/* This one actually does not get it wrong... */ >> +#if defined(__APPLE__) >> +#define SETPGRP_VOID >> +#endif > > Are you sure about this? Last time I checked, and according to the > web-based documentation, setpgrp still expects two pid_t > parameters, see > http://www.hmug.org/man/2/setpgrp.php. That would imply that #undef > SETPGRP_VOID is the right setting. Could you please verify that > with the > setpgrp man page on your system? And, btw, which OSX version do you > have > (Jaguar? Tiger?)? > > Thanks, > Albert > > -- > Dr. Albert Gr"af > Dept. of Music-Informatics, University of Mainz, Germany > Email: Dr....@t-..., ag...@mu... > WWW: http://www.musikinformatik.uni-mainz.de/ag > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > q-lang-users mailing list > q-l...@li... > https://lists.sourceforge.net/lists/listinfo/q-lang-users |