switch to c99 as the default
authorgit <redacted>
Tue, 28 Apr 2026 15:30:20 +0000 (11:30 -0400)
committergit <redacted>
Tue, 28 Apr 2026 15:30:20 +0000 (11:30 -0400)
config.mk
nproc.c
realpath.c

index ff0045d8ef4ada9e453f649f90cac3867480a1b4..72b573c3f5c602bbee23920d84c9365673469bf8 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -1,7 +1,7 @@
 PREFIX = /usr/local
 MANPREFIX = ${PREFIX}/share/man
 
-CFLAGS = -Wall -Wextra -O2
+CFLAGS = -std=c99 -Wall -Wextra -O2
 LDFLAGS =
 
 CC = cc
diff --git a/nproc.c b/nproc.c
index 921ce7cf74e0b5d9bb8236b4f72b7f9fe8b2da4b..695b832eafa6c2eaa242bba1da654fc99e0380d8 100644 (file)
--- a/nproc.c
+++ b/nproc.c
  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
  * OF SUCH DAMAGE.
  */
+#define _XOPEN_SOURCE 700
+
 #include <errno.h>
-#include <getopt.h>
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 
+#include <getopt.h>
+
 #ifndef _SC_NPROCESSORS_CONF
 #error "_SC_NPROCESSORS_CONF not defined, system incompatible"
 #endif
index 0b800d97e82b8dcfe4c1fa12beafb0f0641cd693..6902439aa77af34273ea9e2a470f79de96b5127a 100644 (file)
@@ -28,6 +28,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
+#define _XOPEN_SOURCE 700
 
 #include <errno.h>
 #include <limits.h>
@@ -36,6 +37,8 @@
 #include <string.h>
 #include <unistd.h>
 
+#include <getopt.h>
+
 int
 main(int argc, char *argv[])
 {