From: Bruno Haible Date: Thu, 6 Nov 2025 10:28:43 +0000 (+0100) Subject: stdio-windows: New module. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46bbad11b2785240c0e0b26050f84138897154eb;p=thirdparty%2Fgnulib.git stdio-windows: New module. * modules/stdio-windows: New file, based on modules/stdio-h. * modules/stdio-h: Simplify accordingly. (Depends-on): Add stdio-windows. --- diff --git a/ChangeLog b/ChangeLog index 2e888bdab1..ab93d83349 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2025-11-06 Bruno Haible + + 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 acl-permissions: Don't use AC_REPLACE_FUNCS. diff --git a/modules/stdio-h b/modules/stdio-h index 619d868430..51940a8a8d 100644 --- a/modules/stdio-h +++ b/modules/stdio-h @@ -3,7 +3,6 @@ A GNU-like . 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 index 0000000000..d9489e3e7c --- /dev/null +++ b/modules/stdio-windows @@ -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: + + +License: +LGPLv2+ + +Maintainer: +all