From: git Date: Tue, 28 Apr 2026 15:30:20 +0000 (-0400) Subject: switch to c99 as the default X-Git-Url: https://git.datadissipation.net/?a=commitdiff_plain;h=cd982a7e244efac8f231217159be1c86d53a41ed;p=baseutils.git switch to c99 as the default --- diff --git a/config.mk b/config.mk index ff0045d..72b573c 100644 --- 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 921ce7c..695b832 100644 --- a/nproc.c +++ b/nproc.c @@ -29,14 +29,17 @@ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. */ +#define _XOPEN_SOURCE 700 + #include -#include #include #include #include #include #include +#include + #ifndef _SC_NPROCESSORS_CONF #error "_SC_NPROCESSORS_CONF not defined, system incompatible" #endif diff --git a/realpath.c b/realpath.c index 0b800d9..6902439 100644 --- a/realpath.c +++ b/realpath.c @@ -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 #include @@ -36,6 +37,8 @@ #include #include +#include + int main(int argc, char *argv[]) {