Define _POSIX_C_SOURCE

This allows using the default compiler defined by make(1) (i.e.,
c99(1)), thus improving POSIX compatibility.
This commit is contained in:
Xavier Del Campo Romero 2023-03-24 02:47:11 +01:00
parent 4501c66ebd
commit b3ef22ac2a
Signed by: xavi
GPG Key ID: 84FF3612A9BF43F2
7 changed files with 12 additions and 1 deletions

View File

@ -1,7 +1,6 @@
.POSIX:
.SUFFIXES: .c .o
CC = cc # c99 (default value) does not allow POSIX extensions.
PROJECT = slcl
O = -Og
CDEFS = -D_FILE_OFFSET_BITS=64 # Required for large file support on 32-bit.

View File

@ -1,3 +1,5 @@
#define _POSIX_C_SOURCE 200809L
#include "handler.h"
#include "http.h"
#include "server.h"

2
html.c
View File

@ -1,3 +1,5 @@
#define _POSIX_C_SOURCE 200809L
#include "html.h"
#include <dynstr.h>
#include <errno.h>

2
http.c
View File

@ -1,3 +1,5 @@
#define _POSIX_C_SOURCE 200809L
#include "http.h"
#include <dynstr.h>
#include <sys/types.h>

2
main.c
View File

@ -1,3 +1,5 @@
#define _POSIX_C_SOURCE 200809L
#include "auth.h"
#include "cftw.h"
#include "handler.h"

2
page.c
View File

@ -1,3 +1,5 @@
#define _POSIX_C_SOURCE 200809L
#include "page.h"
#include "http.h"
#include "html.h"

View File

@ -1,3 +1,5 @@
#define _POSIX_C_SOURCE 200809L
#include "server.h"
#include <fcntl.h>
#include <sys/select.h>