Skip to content
Snippets Groups Projects
Commit b599c453 authored by Mateusz Mikuła's avatar Mateusz Mikuła
Browse files

Remove defines that are generated by new cbindgen from bits

parent a8280e89
No related branches found
No related tags found
1 merge request!234Remove defines that are generated by new cbindgen from bits
#ifndef _BITS_FCNTL_H #ifndef _BITS_FCNTL_H
#define _BITS_FCNTL_H #define _BITS_FCNTL_H
#if (defined(__redox__))
#define O_NOFOLLOW 0x80000000
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
// Shamelessly copy pasted from musl: // Shamelessly copy pasted from musl:
#define FLT_RADIX 2
#define FLT_TRUE_MIN 1.40129846432481707092e-45F #define FLT_TRUE_MIN 1.40129846432481707092e-45F
#define FLT_MIN 1.17549435082228750797e-38F #define FLT_MIN 1.17549435082228750797e-38F
#define FLT_MAX 3.40282346638528859812e+38F #define FLT_MAX 3.40282346638528859812e+38F
......
#ifndef _BITS_LIMIT_H #ifndef _BITS_LIMIT_H
#define _BITS_LIMIT_H #define _BITS_LIMIT_H
#define MB_LEN_MAX 4 // unicode
#define CHAR_BIT __CHAR_BIT__ #define CHAR_BIT __CHAR_BIT__
#ifdef __CHAR_MAX__ #ifdef __CHAR_MAX__
# define CHAR_MAX __CHAR_MAX__ # define CHAR_MAX __CHAR_MAX__
......
#ifndef _BITS_NETDB_H #ifndef _BITS_NETDB_H
#define _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.*/ # define h_addr h_addr_list[0] /* Address, for backward compatibility.*/
#endif /* _BITS_NETDB_H */ #endif /* _BITS_NETDB_H */
#define SIG_ERR ((void (*)(int)) -1)
#define SIG_DFL ((void (*)(int)) 0)
#define SIG_IGN ((void (*)(int)) 1)
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
// XXX: this is only here because cbindgen can't handle string constants // XXX: this is only here because cbindgen can't handle string constants
#define P_tmpdir "/tmp" #define P_tmpdir "/tmp"
#define EOF (-1)
typedef struct FILE FILE; typedef struct FILE FILE;
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -18,7 +18,6 @@ pub const O_DIRECTORY: c_int = 0x1000_0000; ...@@ -18,7 +18,6 @@ pub const O_DIRECTORY: c_int = 0x1000_0000;
pub const O_PATH: c_int = 0x2000_0000; pub const O_PATH: c_int = 0x2000_0000;
pub const O_SYMLINK: c_int = 0x4000_0000; pub const O_SYMLINK: c_int = 0x4000_0000;
// Negative to allow it to be used as int // 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 O_NOFOLLOW: c_int = -0x8000_0000;
pub const FD_CLOEXEC: c_int = 0x0100_0000; pub const FD_CLOEXEC: c_int = 0x0100_0000;
sys_includes = ["stdint.h", "sys/types.h", "bits/signal.h"] sys_includes = ["stdint.h", "sys/types.h"]
include_guard = "_SIGNAL_H" include_guard = "_SIGNAL_H"
language = "C" language = "C"
style = "Tag" style = "Tag"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment