@@ -189,9 +189,11 @@ sysdep_headers += sys/timex.h bits/timex.h
sysdep_routines += ntp_gettime ntp_gettimex
endif
+CFLAGS-SIGSTKSZ += -D_SC_SIGSTKSZ_SOURCE -Wno-error=deprecated-declarations
+
ifeq ($(subdir),signal)
# Compile tst-minsigstksz-5.c with _SC_SIGSTKSZ_SOURCE.
-CFLAGS-tst-minsigstksz-5.c += -D_SC_SIGSTKSZ_SOURCE
+CFLAGS-tst-minsigstksz-5.c += $(CFLAGS-SIGSTKSZ)
tests-special += $(objpfx)tst-signal-numbers.out
# Depending on signal.o* is a hack. What we actually want is a dependency
@@ -233,7 +235,7 @@ endif
ifeq ($(subdir),support)
# Compile xsigstack.c with _SC_SIGSTKSZ_SOURCE.
-CFLAGS-xsigstack.c += -D_SC_SIGSTKSZ_SOURCE
+CFLAGS-xsigstack.c += $(CFLAGS-SIGSTKSZ)
endif
ifeq ($(subdir),termios)
@@ -23,11 +23,25 @@
#if __USE_SC_SIGSTKSZ
# include <unistd.h>
+__attribute_deprecated_msg__ ("Use sysconf (_SC_SIGSTKSZ) instead")
+__extern_always_inline long
+SIGSTKSZ_is_deprecated (void)
+{
+ return sysconf (_SC_SIGSTKSZ);
+}
+
+__attribute_deprecated_msg__ ("Use sysconf (_SC_MINSIGSTKSZ) instead")
+__extern_always_inline long
+MINSIGSTKSZ_is_deprecated (void)
+{
+ return sysconf (_SC_SIGSTKSZ);
+}
+
/* Default stack size for a signal handler: sysconf (SC_SIGSTKSZ). */
# undef SIGSTKSZ
-# define SIGSTKSZ sysconf (_SC_SIGSTKSZ)
+# define SIGSTKSZ SIGSTKSZ_is_deprecated ()
/* Minimum stack size for a signal handler: SIGSTKSZ. */
# undef MINSIGSTKSZ
-# define MINSIGSTKSZ SIGSTKSZ
+# define MINSIGSTKSZ MINSIGSTKSZ_is_deprecated ()
#endif