On Mon, Mar 11, 2002 at 10:06:24AM +0100, Arthur Bergman wrote:
> Hi,
> 
> On all modern posix system (not OLD_POSIX_API, here be dragons) you only need
> 
> localtime_r gmtime_r and readdir according to the pthread book, the rest should be 
>safe to use.

I'm sorry but I cannot quite believe that... maybe that was the plan
or intent, but even the SUSv3/POSIX 1003.1-2001 lists at least these:

 char *asctime_r(const struct tm *, char *);
 char *ctime_r(const time_t *, char *);
 struct tm *gmtime_r(const time_t *, struct tm *);
 struct tm *localtime_r(const time_t *, struct tm *);
 int readdir_r(DIR *, struct dirent *, struct dirent **);
 int strerror_r(int errnum, char *strerrbuf, size_t buflen);
 int ttyname_r(int fildes, char *name, size_t namesize);
 int            getpwnam_r(const char *, struct passwd *, char *,
                          size_t, struct passwd **)
 int            getpwuid_r(uid_t, struct passwd *, char *,
                           size_t, struct passwd **);
 int            getgrgid_r(gid_t, struct group *, char *,
                           size_t, struct group **);
 int            getgrnam_r(const char *, struct group *, char *,
                           size_t , struct group **);

If vendor's manpage says: X is thread-unsafe, use X_r instead for MT
applications, I believe that, rather than a book.

> Arthur

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Reply via email to