diff options
Diffstat (limited to 'src/sysdeps')
-rw-r--r-- | src/sysdeps/output-types.c | 25 | ||||
-rw-r--r-- | src/sysdeps/tryemptyregex.c | 16 | ||||
-rw-r--r-- | src/sysdeps/trynullispointer.c | 12 |
3 files changed, 0 insertions, 53 deletions
diff --git a/src/sysdeps/output-types.c b/src/sysdeps/output-types.c deleted file mode 100644 index 22e6093..0000000 --- a/src/sysdeps/output-types.c +++ /dev/null @@ -1,25 +0,0 @@ -/* ISC license. */ - -#include <sys/types.h> -#include <stdio.h> - -#define p(type) printf("sizeof" #type ": %u\nsigned" #type ": %s\n", \ - (unsigned int)sizeof(type##_t), \ - (type##_t)-1 < 0 ? "yes" : "no") ; - -#define q(abbr, type) printf("sizeof" #abbr ": %u\n", (unsigned int)sizeof(type)) ; - -int main (void) -{ - q(ushort, unsigned short) ; - q(uint, unsigned int) ; - q(ulong, unsigned long) ; - p(size) ; - p(uid) ; - p(gid) ; - p(pid) ; - p(time) ; - p(dev) ; - p(ino) ; - return 0 ; -} diff --git a/src/sysdeps/tryemptyregex.c b/src/sysdeps/tryemptyregex.c deleted file mode 100644 index a2243f7..0000000 --- a/src/sysdeps/tryemptyregex.c +++ /dev/null @@ -1,16 +0,0 @@ -/* ISC license. */ - -#include <regex.h> - -int main (void) -{ - regex_t re ; - int r = regcomp(&re, "", REG_EXTENDED | REG_NOSUB) ; - switch (r) - { - case 0 : break ; - case REG_ESPACE : return 111 ; - default : return 1 ; - } - return !!regexec(&re, "a", 0, 0, 0) ; -} diff --git a/src/sysdeps/trynullispointer.c b/src/sysdeps/trynullispointer.c deleted file mode 100644 index cbb3340..0000000 --- a/src/sysdeps/trynullispointer.c +++ /dev/null @@ -1,12 +0,0 @@ -/* ISC license. */ - -/* Explanation: http://www.openwall.com/lists/musl/2013/01/09/13 */ - -#include <stddef.h> - -int main (void) -{ - char s[1][1+(int)NULL] ; - int i = 0 ; - return sizeof s[i++], !i ; -} |