Skip to content
This repository was archived by the owner on Oct 6, 2024. It is now read-only.

Commit 10d71ad

Browse files
committed
Use c99
Signed-off-by: Mattias Andrée <maandree@kth.se>
1 parent 062827d commit 10d71ad

File tree

3 files changed

+10
-28
lines changed

3 files changed

+10
-28
lines changed

.gitignore

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
/hungarian
21
*~
3-
\#*\#
4-
.*
5-
!.git*
6-
*.bak
7-
*.swp
8-
*.swo
2+
*#*
93
*.su
10-
*.o
11-
*.out
12-
*.gch
13-
4+
/hungarian

Makefile

+7-17
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,17 @@
1-
OPTIMISE = -Og -g
2-
WARN = -Wall -Wextra -pedantic -Wdouble-promotion -Wformat=2 -Winit-self -Wmissing-include-dirs \
3-
-Wtrampolines -Wfloat-equal -Wshadow -Wmissing-prototypes -Wmissing-declarations \
4-
-Wredundant-decls -Wnested-externs -Winline -Wno-variadic-macros -Wsync-nand \
5-
-Wunsafe-loop-optimizations -Wcast-align -Wstrict-overflow \
6-
-Wundef -Wbad-function-cast -Wcast-qual -Wwrite-strings -Wlogical-op -Waggregate-return \
7-
-Wstrict-prototypes -Wold-style-definition -Wpacked -Wvector-operation-performance \
8-
-Wunsuffixed-float-constants -Wsuggest-attribute=const -Wsuggest-attribute=noreturn \
9-
-Wsuggest-attribute=pure -Wsuggest-attribute=format -Wnormalized=nfkc -Wconversion \
10-
-fstrict-aliasing -fstrict-overflow -fipa-pure-const -ftree-vrp -fstack-usage \
11-
-funsafe-loop-optimizations -Wdeclaration-after-statement
1+
.POSIX:
2+
3+
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700
4+
CFLAGS = -std=c99 -g
5+
LDFLAGS =
126

137

148
all: hungarian
159

1610
hungarian: hungarian.c
17-
gcc -std=gnu99 $(OPTIMISE) $(WARN) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -o $@ $<
18-
19-
test: hungarian
20-
./hungarian
11+
gcc -o $@ $< $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
2112

2213
clean:
2314
-rm -f -- hungarian
2415

2516

26-
.PHONY: all test valgrind clean
27-
17+
.PHONY: all clean

hungarian.c

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212

1313

14+
#include <sys/types.h>
1415
#include <stddef.h>
1516
#include <stdio.h>
1617
#include <stdlib.h>

0 commit comments

Comments
 (0)