This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Making getenv more multi-threading--robust?


POSIX does not require getenv vs setenv to be thread-safe, but Solaris
documents it as being thread-safe.  So I think it's a reasonable change.
File a bug in bugzilla about it first.

Put the definition of the lock in getenv.c, so that when linking
statically, using getenv does not force setenv to be linked in.

getenv.c is already not intended to be built outside libc, so there is no
need for #ifdef _LIBC in there.  setenv.c is shared with gnulib (though
they are out of synch), so maintaining its existing conditionalization is
appropriate.


Thanks,
Roland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]