diff options
author | Bruno Haible <bruno@clisp.org> | 2019-09-15 17:41:29 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-09-15 17:41:29 +0200 |
commit | c5f7c7c69b3b986c49930c1c7ac37c552a3be738 (patch) | |
tree | 154ad65d2faf2341dae38d9004ae457327cc4f32 /m4/creat.m4 | |
parent | 9e75623a64a07215f2c7811e0356697d6df10fa2 (diff) | |
download | gnulib-c5f7c7c69b3b986c49930c1c7ac37c552a3be738.tar.gz |
creat: New module.
* lib/fcntl.in.h (creat): New declaration.
* lib/creat.c: New file, based on lib/open.c.
* m4/creat.m4: New file.
* m4/open-slash.m4: New file, extracted from m4/open.m4.
* m4/open.m4 (gl_FUNC_OPEN): Move trailing-slash test to open-slash.m4.
Invoke gl_OPEN_TRAILING_SLASH_BUG.
* modules/open (Files): Add m4/open-slash.m4.
* m4/fcntl_h.m4 (gl_FCNTL_H_DEFAULTS): Initialize GNULIB_CREAT,
REPLACE_CREAT.
* modules/fcntl-h (Makefile.am): Substitute GNULIB_CREAT, REPLACE_CREAT.
* modules/creat: New file.
* tests/test-fcntl-h-c++.cc (creat): Check signature.
* doc/posix-functions/creat.texi: Mention the new module.
Diffstat (limited to 'm4/creat.m4')
-rw-r--r-- | m4/creat.m4 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/m4/creat.m4 b/m4/creat.m4 new file mode 100644 index 0000000000..a428a72c80 --- /dev/null +++ b/m4/creat.m4 @@ -0,0 +1,23 @@ +# creat.m4 serial 1 +dnl Copyright (C) 2019 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_CREAT], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + case "$host_os" in + mingw*) + REPLACE_CREAT=1 + ;; + *) + gl_OPEN_TRAILING_SLASH_BUG + case "$gl_cv_func_open_slash" in + *no) + REPLACE_CREAT=1 + ;; + esac + ;; + esac +]) |