[LLVMdev] misc CVS patches

Jeff Cohen jeffc at jolt-lang.org
Wed Apr 20 09:24:37 PDT 2005

Misha Brukman wrote:

>>I didn't use get{u,g}id() because that's not portable - I think we
>>need another abstraction in the System library for these.
>Hmm, seems like it's available on the Unices that we support: Linux, OS
>X, and SunOS.  Man page lists getgid() as conforming to POSIX and BSD
>4.3, so I'm assuming *BSD has them too (can't confirm for lack of a *BSD
>system).  As soon as we run into a Unix system that we want to support,
>we might have to go the abstraction route, but it seems to work for our
>currently-supported platforms.
FreeBSD has them.  According to its man pages, getuid was introduced in 
Version 7 AT&T Unix.  Ancient history.  It doesn't say when getgid was 
introduced, but it's just as old as it's documented in my 1980 edition 
Berkeley VAX UNIX manual, and in any case both are in POSIX.1 and 
therefore ought to be portable by definition.

More information about the llvm-dev mailing list