On Tue, Jun 7, 2011 at 12:31 PM, Ronald Burgman < r.w.burg...@student.utwente.nl> wrote:
> Now, I'm not sure if getpwuid actually allocates memory. Some > documentation does not mention anything about it; some mention it is not > possible; some mention that getpwuid can result in an ENOMEM > (allocation failed) error, > which clearly indicates that getpwuid tries to allocate some memory. > Since I'm not sure I thought I should ask the experts. > According to the linux docs: -------- The return value may point to a static area, and may be overwritten by subsequent calls to getpwent(3), getpwnam(), or getpwuid(). (Do not pass the returned pointer to free(3).) CONFORMING TO SVr4, 4.3BSD, POSIX.1-2001. -------- Since they do not list the do-not-free() as being incompatible with the listed specifications, my strong instinct is to trust this description. The linux man pages tend to explicitly mark any behaviours which do not conform to the spec(s) mentioned in the "CONFORMING TO" section of the given man page. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users