summaryrefslogtreecommitdiff
path: root/nix-test/src/sizes.c
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2017-12-08 14:44:02 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2017-12-08 14:44:02 +0000
commit7eaa20810a656158e4d57b792c58481f10987788 (patch)
tree0d2611e909d5eaa301211bdd0cb321ac57852d92 /nix-test/src/sizes.c
parentd96518cf1b1877f1d8445e3e0e878fd25fbc822c (diff)
parenta79d228de73141f9e816d4f23ebd0c8c4ed37f6f (diff)
downloadnix-7eaa20810a656158e4d57b792c58481f10987788.zip
Merge #807
807: Switch to libc definitons of errno constants r=Susurrus a=Susurrus Still need to do OpenBSD and NetBSD. Primary goal with this first pass is to see what doesn't exist properly in `libc`. Closes #487.
Diffstat (limited to 'nix-test/src/sizes.c')
-rw-r--r--nix-test/src/sizes.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/nix-test/src/sizes.c b/nix-test/src/sizes.c
deleted file mode 100644
index ca862003..00000000
--- a/nix-test/src/sizes.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <sys/socket.h>
-#include <sys/uio.h>
-
-#include <string.h>
-
-#define SIZE_OF_T(TYPE) \
- do { \
- if (0 == strcmp(type, #TYPE)) { \
- return sizeof(TYPE); \
- } \
- } while (0)
-
-#define SIZE_OF_S(TYPE) \
- do { \
- if (0 == strcmp(type, #TYPE)) { \
- return sizeof(struct TYPE); \
- } \
- } while (0)
-
-size_t
-size_of(const char* type) {
- // Builtin
- SIZE_OF_T(long);
-
- // sys/socket
- SIZE_OF_S(sockaddr_storage);
-
- // sys/uio
- SIZE_OF_S(iovec);
-
- return 0;
-}