use -std=c11
This commit is contained in:
parent
112d3fd03b
commit
b74571e500
2
TODO
2
TODO
@ -1,5 +1,5 @@
|
||||
[x] use system lua lib
|
||||
[ ] make it std=c11 not gnu11
|
||||
[x] make it std=c11 not gnu11
|
||||
[ ] make it compile on openbsd
|
||||
[ ] update license, readme and documentation
|
||||
[ ] add manpage
|
||||
|
2
makefile
2
makefile
@ -4,7 +4,7 @@ PREFIX = /usr/local
|
||||
MANPREFIX = ${PREFIX}/share/man
|
||||
CC ?= gcc
|
||||
SRCDIR = ./src
|
||||
CFLAGS = -Wall -Werror -pedantic -O3 -std=gnu11 -fno-strict-aliasing \
|
||||
CFLAGS = -Wall -Werror -pedantic -O3 -std=c11 -fno-strict-aliasing \
|
||||
-I${SRCDIR} -DLUA_USE_POSIX
|
||||
# remove this
|
||||
LDFLAGS = -lSDL2 -lm -llua5.2
|
||||
|
@ -1,10 +1,16 @@
|
||||
#include <SDL2/SDL.h>
|
||||
#define _XOPEN_SOURCE 700
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <ctype.h>
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
#include "api.h"
|
||||
#include "rencache.h"
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#define _POSIX_C_SOURCE 200809l
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <SDL2/SDL.h>
|
||||
@ -5,10 +7,8 @@
|
||||
#include "api/api.h"
|
||||
#include "renderer.h"
|
||||
|
||||
|
||||
SDL_Window *window;
|
||||
|
||||
|
||||
static double get_scale(void)
|
||||
{
|
||||
float dpi;
|
||||
@ -16,7 +16,6 @@ static double get_scale(void)
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
|
||||
static void get_exe_filename(char *buf, int sz)
|
||||
{
|
||||
char path[512];
|
||||
@ -25,7 +24,6 @@ static void get_exe_filename(char *buf, int sz)
|
||||
buf[len] = '\0';
|
||||
}
|
||||
|
||||
|
||||
static void init_window_icon(void)
|
||||
{
|
||||
// FIXME: include inside function!?
|
||||
|
Loading…
Reference in New Issue
Block a user