From b599c453a0f38711e5ab4cce4eda74954609cdf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= Date: Thu, 18 Jul 2019 08:05:57 +0000 Subject: [PATCH] Remove defines that are generated by new cbindgen from bits --- include/bits/fcntl.h | 4 ---- include/bits/float.h | 2 -- include/bits/limits.h | 2 -- include/bits/netdb.h | 13 ------------- include/bits/signal.h | 3 --- include/bits/stdio.h | 2 -- src/header/fcntl/redox.rs | 1 - src/header/signal/cbindgen.toml | 2 +- 8 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 include/bits/signal.h diff --git a/include/bits/fcntl.h b/include/bits/fcntl.h index e0fcf8dee8..3776447736 100644 --- a/include/bits/fcntl.h +++ b/include/bits/fcntl.h @@ -1,10 +1,6 @@ #ifndef _BITS_FCNTL_H #define _BITS_FCNTL_H -#if (defined(__redox__)) -#define O_NOFOLLOW 0x80000000 -#endif - #ifdef __cplusplus extern "C" { #endif diff --git a/include/bits/float.h b/include/bits/float.h index 01e393eade..fd1728a1a3 100644 --- a/include/bits/float.h +++ b/include/bits/float.h @@ -5,8 +5,6 @@ // Shamelessly copy pasted from musl: -#define FLT_RADIX 2 - #define FLT_TRUE_MIN 1.40129846432481707092e-45F #define FLT_MIN 1.17549435082228750797e-38F #define FLT_MAX 3.40282346638528859812e+38F diff --git a/include/bits/limits.h b/include/bits/limits.h index 11452e0e97..7d5e88072f 100644 --- a/include/bits/limits.h +++ b/include/bits/limits.h @@ -1,8 +1,6 @@ #ifndef _BITS_LIMIT_H #define _BITS_LIMIT_H -#define MB_LEN_MAX 4 // unicode - #define CHAR_BIT __CHAR_BIT__ #ifdef __CHAR_MAX__ # define CHAR_MAX __CHAR_MAX__ diff --git a/include/bits/netdb.h b/include/bits/netdb.h index 493719a882..698e0e216a 100644 --- a/include/bits/netdb.h +++ b/include/bits/netdb.h @@ -1,19 +1,6 @@ #ifndef _BITS_NETDB_H #define _BITS_NETDB_H -#define EAI_BADFLAGS (-1) -#define EAI_NONAME (-2) -#define EAI_AGAIN (-3) -#define EAI_FAIL (-4) -#define EAI_NODATA (-5) -#define EAI_FAMILY (-6) -#define EAI_SOCKTYPE (-7) -#define EAI_SERVICE (-8) -#define EAI_ADDRFAMILY (-9) -#define EAI_MEMORY (-10) -#define EAI_SYSTEM (-11) -#define EAI_OVERFLOW (-12) - # define h_addr h_addr_list[0] /* Address, for backward compatibility.*/ #endif /* _BITS_NETDB_H */ diff --git a/include/bits/signal.h b/include/bits/signal.h deleted file mode 100644 index d3645d9b03..0000000000 --- a/include/bits/signal.h +++ /dev/null @@ -1,3 +0,0 @@ -#define SIG_ERR ((void (*)(int)) -1) -#define SIG_DFL ((void (*)(int)) 0) -#define SIG_IGN ((void (*)(int)) 1) diff --git a/include/bits/stdio.h b/include/bits/stdio.h index 97c6c1036b..04bb2b9b3c 100644 --- a/include/bits/stdio.h +++ b/include/bits/stdio.h @@ -4,8 +4,6 @@ // XXX: this is only here because cbindgen can't handle string constants #define P_tmpdir "/tmp" -#define EOF (-1) - typedef struct FILE FILE; #ifdef __cplusplus diff --git a/src/header/fcntl/redox.rs b/src/header/fcntl/redox.rs index 2f32784093..d8847aeea1 100644 --- a/src/header/fcntl/redox.rs +++ b/src/header/fcntl/redox.rs @@ -18,7 +18,6 @@ pub const O_DIRECTORY: c_int = 0x1000_0000; pub const O_PATH: c_int = 0x2000_0000; pub const O_SYMLINK: c_int = 0x4000_0000; // Negative to allow it to be used as int -// TODO: Fix negative values missing from includes pub const O_NOFOLLOW: c_int = -0x8000_0000; pub const FD_CLOEXEC: c_int = 0x0100_0000; diff --git a/src/header/signal/cbindgen.toml b/src/header/signal/cbindgen.toml index 32a7a05e61..cbcd1afc48 100644 --- a/src/header/signal/cbindgen.toml +++ b/src/header/signal/cbindgen.toml @@ -1,4 +1,4 @@ -sys_includes = ["stdint.h", "sys/types.h", "bits/signal.h"] +sys_includes = ["stdint.h", "sys/types.h"] include_guard = "_SIGNAL_H" language = "C" style = "Tag"