This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libfortran/47375] getlog causes warnings with static linking


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47375

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-20 13:08:43 UTC ---
Maybe one should use getpwnam_r and  getpwuid_r instead of getpwnam and 
getpwuid (at least if the _r versions are available); the non-_r versions are
used according to http://gcc.gnu.org/onlinedocs/gfortran/GETLOG.html

>From POSIX/SUS 2003:
"
       #include <pwd.h>

       struct passwd *getpwuid(uid_t uid);

       int getpwuid_r(uid_t uid, struct passwd *pwd, char *buffer,
              size_t bufsize, struct passwd **result);

 [...]
 APPLICATION USAGE
 [...]
 The  getpwuid_r()  function is thread-safe and returns values in a
 user-supplied buffer instead of possibly using a static data area
 that may be overwritten by each call."


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