Re: [Sablevm-developer] Errno usage considered harmful?!
Brought to you by:
egagnon
From: Stephen C. <s1...@me...> - 2004-03-12 20:47:34
|
"Grzegorz B. Prokopski" <ga...@de...> writes: > 1. If I add: > #include <errno.h> > extern int errno; > I get such warning: > java_lang_ProcessImpl.c:24: warning: function declaration isn't a > prototype If you are really concerned about systems whose errno.h doesn't declare errno, wrap the variable declaration in a !defined(errno) check. This is what bash (not to mention GNU errno.h) does. I suppose you'd get a warning if you had -Wredundant-decls on and weren't building with threads, but I don't think you do. On GNU, when you are using threads, errno expands to a function call (__errno_location) that returns a pointer, which is then dereferenced. -- Stephen Compall or s11 or sirian The best thing about growing older is that it takes such a long time. bullion Fortezza class struggle lynch Becker spy bootleg Telex Saddam Hussein wire transfer AMW high security bce Manfurov PGP |