]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
stdio-windows: New module.
authorBruno Haible <bruno@clisp.org>
Thu, 6 Nov 2025 10:28:43 +0000 (11:28 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 6 Nov 2025 10:28:43 +0000 (11:28 +0100)
* modules/stdio-windows: New file, based on modules/stdio-h.
* modules/stdio-h: Simplify accordingly.
(Depends-on): Add stdio-windows.

ChangeLog
modules/stdio-h
modules/stdio-windows [new file with mode: 0644]

index 2e888bdab144cb15087e868da057fad21d292a3d..ab93d8334906ea5fc673024552101ec992619d4f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-11-06  Bruno Haible  <bruno@clisp.org>
+
+       stdio-windows: New module.
+       * modules/stdio-windows: New file, based on modules/stdio-h.
+       * modules/stdio-h: Simplify accordingly.
+       (Depends-on): Add stdio-windows.
+
 2025-11-05  Bruno Haible  <bruno@clisp.org>
 
        acl-permissions: Don't use AC_REPLACE_FUNCS.
index 619d8684301e8399451344f5e1e68e549deef613..51940a8a8d9bd7e4d186c5b9173141631d4059dd 100644 (file)
@@ -3,7 +3,6 @@ A GNU-like <stdio.h>.
 
 Files:
 lib/stdio.in.h
-lib/stdio-consolesafe.c
 lib/stdio-read.c
 lib/stdio-write.c
 m4/stdio_h.m4
@@ -19,8 +18,7 @@ snippet/warn-on-use
 ssize_t
 stddef-h
 sys_types-h
-stdckdint-h
-fseterr
+stdio-windows
 
 configure.ac-early:
 gl_STDIO_H_EARLY
@@ -29,18 +27,6 @@ configure.ac:
 gl_STDIO_H
 gl_STDIO_H_REQUIRE_DEFAULTS
 AC_PROG_MKDIR_P
-USES_MSVCRT=0
-case "$host_os" in
-  mingw* | windows*)
-    AC_EGREP_CPP([Special], [
-#ifndef _UCRT
- Special
-#endif
-      ],
-      [USES_MSVCRT=1])
-    ;;
-esac
-gl_CONDITIONAL([GL_COND_OBJ_STDIO_CONSOLESAFE], [test $USES_MSVCRT = 1])
 gl_CONDITIONAL([GL_COND_OBJ_STDIO_READ], [test $REPLACE_STDIO_READ_FUNCS = 1])
 gl_CONDITIONAL([GL_COND_OBJ_STDIO_WRITE], [test $REPLACE_STDIO_WRITE_FUNCS = 1])
 
@@ -219,9 +205,6 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
        $(AM_V_at)mv $@-t3 $@
 MOSTLYCLEANFILES += stdio.h stdio.h-t1 stdio.h-t2 stdio.h-t3
 
-if GL_COND_OBJ_STDIO_CONSOLESAFE
-lib_SOURCES += stdio-consolesafe.c
-endif
 if GL_COND_OBJ_STDIO_READ
 lib_SOURCES += stdio-read.c
 endif
diff --git a/modules/stdio-windows b/modules/stdio-windows
new file mode 100644 (file)
index 0000000..d9489e3
--- /dev/null
@@ -0,0 +1,39 @@
+Description:
+Auxiliary module for stdio.h on native Windows.
+
+Files:
+lib/stdio-consolesafe.c
+
+Depends-on:
+stdio-h
+stdckdint-h
+fseterr
+
+configure.ac:
+AC_REQUIRE([AC_CANONICAL_HOST])
+USES_MSVCRT=0
+case "$host_os" in
+  mingw* | windows*)
+    AC_EGREP_CPP([Special], [
+#ifndef _UCRT
+ Special
+#endif
+      ],
+      [USES_MSVCRT=1])
+    ;;
+esac
+gl_CONDITIONAL([GL_COND_OBJ_STDIO_CONSOLESAFE], [test $USES_MSVCRT = 1])
+
+Makefile.am:
+if GL_COND_OBJ_STDIO_CONSOLESAFE
+lib_SOURCES += stdio-consolesafe.c
+endif
+
+Include:
+<stdio.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all