Browse Source

Merge branch 'defines-cleanup' into 'master'

Remove defines that are generated by new cbindgen from bits

See merge request redox-os/relibc!234
Jeremy Soller 5 years ago
parent
commit
f1be9266e2

+ 0 - 4
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

+ 0 - 2
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

+ 0 - 2
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__

+ 0 - 13
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 */

+ 0 - 3
include/bits/signal.h

@@ -1,3 +0,0 @@
-#define SIG_ERR ((void (*)(int)) -1)
-#define SIG_DFL ((void (*)(int)) 0)
-#define SIG_IGN ((void (*)(int)) 1)

+ 0 - 2
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

+ 0 - 1
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;

+ 1 - 1
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"