Properly set stuff up (defined _POSIX_C_SOURCE)
This commit is contained in:
parent
e6c12928b8
commit
7cb8f7174d
20 changed files with 42 additions and 24 deletions
2
asa.c
2
asa.c
|
@ -1,3 +1,5 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
2
cat.c
2
cat.c
|
@ -1,3 +1,5 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
4
cksum.c
4
cksum.c
|
@ -1,3 +1,5 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
@ -83,7 +85,7 @@ int main(int argc, char ** argv) {
|
||||||
fprintf(stderr, "Cannot find file %s\n", argv[i]);
|
fprintf(stderr, "Cannot find file %s\n", argv[i]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
printf("%u %d %s\n", crc32(current_file), count_octets(current_file),
|
printf("%u %d %s\n", crc32(in_file), count_octets(in_file),
|
||||||
argv[i]);
|
argv[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
cmp.c
2
cmp.c
|
@ -1,3 +1,5 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
2
echo.c
2
echo.c
|
@ -1,3 +1,5 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int ctoi(char c);
|
int ctoi(char c);
|
||||||
|
|
2
expand.c
2
expand.c
|
@ -1,3 +1,5 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
2
false.c
2
false.c
|
@ -1,3 +1,5 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
2
head.c
2
head.c
|
@ -1,3 +1,5 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
2
link.c
2
link.c
|
@ -1,3 +1,5 @@
|
||||||
|
#define _XOPEN_SOUCE 700
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
2
ln.c
2
ln.c
|
@ -1,3 +1,5 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
2
pwd.c
2
pwd.c
|
@ -1,3 +1,5 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
2
sleep.c
2
sleep.c
|
@ -1,3 +1,5 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
|
12
tee.c
12
tee.c
|
@ -1,17 +1,9 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/*
|
|
||||||
Why is it always the fucking GNU Project causing
|
|
||||||
problems?! For fuck's sake!
|
|
||||||
|
|
||||||
-Kat
|
|
||||||
*/
|
|
||||||
#ifdef __GLIBC__
|
|
||||||
#define __USE_POSIX2
|
|
||||||
#endif
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int main(int argc, char * argv[]) {
|
int main(int argc, char * argv[]) {
|
||||||
|
|
2
true.c
2
true.c
|
@ -1,3 +1,5 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
4
tty.c
4
tty.c
|
@ -1,6 +1,8 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
if(isatty(fileno(stdin))) {
|
if(isatty(fileno(stdin))) {
|
||||||
|
|
14
uname.c
14
uname.c
|
@ -1,18 +1,8 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
/*
|
|
||||||
Ah, yes. Stuff just to satisfy the GNU project.
|
|
||||||
I look forward to the day we can start doing
|
|
||||||
development on our own system with our own
|
|
||||||
C library. I should really work on that.
|
|
||||||
|
|
||||||
-Kat
|
|
||||||
*/
|
|
||||||
#ifdef __GLIBC__
|
|
||||||
#define __USE_POSIX2
|
|
||||||
#endif
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int main(int argc, char * argv[]) {
|
int main(int argc, char * argv[]) {
|
||||||
|
|
2
wc.c
2
wc.c
|
@ -1,3 +1,5 @@
|
||||||
|
#define _POSIX_C_SOURCE 200809L
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue