[LLVMdev] misc CVS patches

Reid Spencer reid at x10sys.com
Thu Apr 21 08:44:48 PDT 2005


Markus,

This patch can't be applied. Not all platforms have getgid() and getuid
() functions. Placing non-portable code outside of lib/System is
deprecated. We set the values to 1000 by default because in general the
uid/gid doesn't matter in an archive and the 1000 value gets you to a
safe (non-root, non-system) value. If a specific value for these is
needed on a given platform, then we need to implement something like
"getDefaultUserId" and "getDefaultGroupId"  functions in lib/System and
use those in lib/Bytecode/Archive. 

Is there a specific problem that is driving these changes?

Reid.

On Thu, 2005-04-21 at 17:17 +0200, Markus F.X.J. Oberhumer wrote:

> Jeff Cohen wrote:
> > 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.
> 
> Does windows have these ?
> 
> In any case, below is another small patch for lib/Bytecode/Archive.
> 
> ~Markus
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev



_______________________
Reid Spencer
President & CTO
eXtensible Systems, Inc.
rspencer at x10sys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050421/45ef3b33/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050421/45ef3b33/attachment.sig>


More information about the llvm-dev mailing list