diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-01-05 18:02:32 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-01-05 18:04:24 -0800 |
commit | a4015f0453aeb60cfa70dcdfbd78db62b3a79b62 (patch) | |
tree | 1610aa11de37a70de9bc193ff0259b52032dbe53 /lib/stdopen.h | |
parent | 14e1f1c39766bcb3fe4d6ec975ecac4058d11d98 (diff) | |
download | gnulib-a4015f0453aeb60cfa70dcdfbd78db62b3a79b62.tar.gz |
stdopen: modernize and simplify
* lib/stdopen.c: Update copyright date
Do not include sys/types.h; no longer needed these days.
(stdopen): Use C99-style decl in loop. Return int errno
value, rather than just a bool. Do not worry about fd mismatches,
since the caller cares only if 0, 1, 2 are occupied.
* lib/stdopen.h: No need to include <stdbool.h>.
* m4/stdopen.m4: Remove.
* modules/stdopen: New file.
Diffstat (limited to 'lib/stdopen.h')
-rw-r--r-- | lib/stdopen.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/stdopen.h b/lib/stdopen.h index d54e5f1350..27901d397c 100644 --- a/lib/stdopen.h +++ b/lib/stdopen.h @@ -1,13 +1,11 @@ #ifndef STDOPEN_H # define STDOPEN_H 1 -# include <stdbool.h> - # ifdef __cplusplus extern "C" { # endif -bool stdopen (void); +int stdopen (void); # ifdef __cplusplus } |