+2024-04-17 Bruno Haible <bruno@clisp.org>
+
+ stdio, utime-h: Fix more linkage errors when using C++.
+ * lib/stdio.in.h (rpl_fwrite, rpl_fwrite_unlocked): Use _GL_EXTERN_C
+ instead of extern.
+ * lib/utime.in.h (_gl_utimens_windows): Likewise.
+
2024-04-17 Bruno Haible <bruno@clisp.org>
Fix linkage errors when using C++.
&& !defined __cplusplus)
# undef fwrite
# undef fwrite_unlocked
-extern size_t __REDIRECT (rpl_fwrite,
- (const void *__restrict, size_t, size_t,
- FILE *__restrict),
- fwrite);
-extern size_t __REDIRECT (rpl_fwrite_unlocked,
- (const void *__restrict, size_t, size_t,
- FILE *__restrict),
- fwrite_unlocked);
+_GL_EXTERN_C size_t __REDIRECT (rpl_fwrite,
+ (const void *__restrict, size_t, size_t,
+ FILE *__restrict),
+ fwrite);
+_GL_EXTERN_C size_t __REDIRECT (rpl_fwrite_unlocked,
+ (const void *__restrict, size_t, size_t,
+ FILE *__restrict),
+ fwrite_unlocked);
# define fwrite rpl_fwrite
# define fwrite_unlocked rpl_fwrite_unlocked
# endif
#endif
#if @GNULIB_UTIME@
-extern int _gl_utimens_windows (const char *filename, struct timespec ts[2]);
+_GL_EXTERN_C int _gl_utimens_windows (const char *filename, struct timespec ts[2]);
#endif