Explorar o código

Large reorganization of headers (WIP)

Jeremy Soller %!s(int64=6) %!d(string=hai) anos
pai
achega
c20ce5ffed
Modificáronse 100 ficheiros con 144 adicións e 746 borrados
  1. 20 397
      Cargo.lock
  2. 16 39
      Cargo.toml
  3. 5 0
      Makefile
  4. 15 15
      build.rs
  5. 16 0
      header.sh
  6. 0 14
      src/arpainet/Cargo.toml
  7. 0 11
      src/arpainet/build.rs
  8. 1 2
      src/crt0/Cargo.toml
  9. 4 2
      src/crt0/src/lib.rs
  10. 0 11
      src/ctype/Cargo.toml
  11. 0 11
      src/ctype/build.rs
  12. 0 15
      src/dirent/Cargo.toml
  13. 0 11
      src/dirent/build.rs
  14. 0 11
      src/errno/Cargo.toml
  15. 0 11
      src/errno/build.rs
  16. 0 11
      src/fcntl/Cargo.toml
  17. 0 11
      src/fcntl/build.rs
  18. 0 10
      src/fenv/Cargo.toml
  19. 0 11
      src/fenv/build.rs
  20. 0 11
      src/float/Cargo.toml
  21. 0 11
      src/float/build.rs
  22. 0 10
      src/fnmatch/Cargo.toml
  23. 0 11
      src/fnmatch/build.rs
  24. 0 11
      src/grp/Cargo.toml
  25. 0 11
      src/grp/build.rs
  26. 0 0
      src/header/_template/cbindgen.toml
  27. 0 0
      src/header/_template/mod.rs
  28. 0 0
      src/header/_todo/aio/lib.rs
  29. 0 0
      src/header/_todo/oldlib/dns/answer.rs
  30. 0 0
      src/header/_todo/oldlib/dns/mod.rs
  31. 0 0
      src/header/_todo/oldlib/dns/query.rs
  32. 0 0
      src/header/_todo/oldlib/event.rs
  33. 0 0
      src/header/_todo/oldlib/file.rs
  34. 0 0
      src/header/_todo/oldlib/folder.rs
  35. 0 0
      src/header/_todo/oldlib/hostname.rs
  36. 0 0
      src/header/_todo/oldlib/lib.rs
  37. 0 0
      src/header/_todo/oldlib/macros.rs
  38. 0 0
      src/header/_todo/oldlib/mallocnull.rs
  39. 0 0
      src/header/_todo/oldlib/netdb.rs
  40. 0 0
      src/header/_todo/oldlib/process.rs
  41. 0 0
      src/header/_todo/oldlib/rawfile.rs
  42. 0 0
      src/header/_todo/oldlib/redox.rs
  43. 0 0
      src/header/_todo/oldlib/socket.rs
  44. 0 0
      src/header/_todo/oldlib/termios.rs
  45. 0 0
      src/header/_todo/oldlib/time.rs
  46. 0 0
      src/header/_todo/oldlib/types.rs
  47. 0 0
      src/header/_todo/oldlib/unimpl.rs
  48. 0 0
      src/header/_todo/oldlib/user.rs
  49. 0 0
      src/header/_todo/pthread/lib.rs
  50. 0 0
      src/header/_todo/wctype/lib.rs
  51. 1 1
      src/header/arpa_inet/cbindgen.toml
  52. 6 14
      src/header/arpa_inet/mod.rs
  53. 0 0
      src/header/ctype/cbindgen.toml
  54. 1 4
      src/header/ctype/mod.rs
  55. 0 0
      src/header/dirent/cbindgen.toml
  56. 2 10
      src/header/dirent/mod.rs
  57. 0 0
      src/header/errno/cbindgen.toml
  58. 1 4
      src/header/errno/mod.rs
  59. 0 0
      src/header/fcntl/cbindgen.toml
  60. 0 0
      src/header/fcntl/linux.rs
  61. 1 4
      src/header/fcntl/mod.rs
  62. 0 0
      src/header/fcntl/redox.rs
  63. 0 0
      src/header/fenv/cbindgen.toml
  64. 1 4
      src/header/fenv/mod.rs
  65. 0 0
      src/header/float/cbindgen.toml
  66. 2 6
      src/header/float/mod.rs
  67. 0 0
      src/header/fnmatch/cbindgen.toml
  68. 2 5
      src/header/fnmatch/mod.rs
  69. 0 0
      src/header/grp/cbindgen.toml
  70. 1 4
      src/header/grp/mod.rs
  71. 0 0
      src/header/inttypes/cbindgen.toml
  72. 3 9
      src/header/inttypes/mod.rs
  73. 0 0
      src/header/locale/cbindgen.toml
  74. 2 5
      src/header/locale/mod.rs
  75. 38 0
      src/header/mod.rs
  76. 0 0
      src/header/netinet_in/Cargo.toml
  77. 0 0
      src/header/netinet_in/cbindgen.toml
  78. 2 6
      src/header/netinet_in/mod.rs
  79. 0 0
      src/header/pwd/cbindgen.toml
  80. 3 8
      src/header/pwd/mod.rs
  81. 0 0
      src/header/semaphore/cbindgen.toml
  82. 1 4
      src/header/semaphore/mod.rs
  83. 0 0
      src/header/setjmp/Cargo.toml
  84. 0 0
      src/header/setjmp/src/impl/README.md
  85. 0 0
      src/header/setjmp/src/impl/aarch64/longjmp.s
  86. 0 0
      src/header/setjmp/src/impl/aarch64/setjmp.s
  87. 0 0
      src/header/setjmp/src/impl/arm/longjmp.s
  88. 0 0
      src/header/setjmp/src/impl/arm/setjmp.s
  89. 0 0
      src/header/setjmp/src/impl/i386/longjmp.s
  90. 0 0
      src/header/setjmp/src/impl/i386/setjmp.s
  91. 0 0
      src/header/setjmp/src/impl/m68k/longjmp.s
  92. 0 0
      src/header/setjmp/src/impl/m68k/setjmp.s
  93. 0 0
      src/header/setjmp/src/impl/microblaze/longjmp.s
  94. 0 0
      src/header/setjmp/src/impl/microblaze/setjmp.s
  95. 0 0
      src/header/setjmp/src/impl/mips/longjmp.S
  96. 0 0
      src/header/setjmp/src/impl/mips/setjmp.S
  97. 0 0
      src/header/setjmp/src/impl/mips64/longjmp.S
  98. 0 0
      src/header/setjmp/src/impl/mips64/setjmp.S
  99. 0 0
      src/header/setjmp/src/impl/mipsn32/longjmp.S
  100. 0 0
      src/header/setjmp/src/impl/mipsn32/setjmp.S

+ 20 - 397
Cargo.lock

@@ -6,17 +6,6 @@ dependencies = [
  "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
-[[package]]
-name = "arpainet"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "errno 0.1.0",
- "netinet 0.1.0",
- "platform 0.1.0",
- "sys_socket 0.1.0",
-]
-
 [[package]]
 name = "atty"
 version = "0.2.10"
@@ -79,28 +68,7 @@ source = "git+https://github.com/rust-lang-nursery/compiler-builtins.git#5d370bb
 name = "crt0"
 version = "0.1.0"
 dependencies = [
- "platform 0.1.0",
- "stdio 0.1.0",
-]
-
-[[package]]
-name = "ctype"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
-
-[[package]]
-name = "dirent"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "errno 0.1.0",
- "fcntl 0.1.0",
- "platform 0.1.0",
- "stdio 0.1.0",
- "unistd 0.1.0",
+ "relibc 0.1.0",
 ]
 
 [[package]]
@@ -108,47 +76,6 @@ name = "dtoa"
 version = "0.4.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
-[[package]]
-name = "errno"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
-
-[[package]]
-name = "fcntl"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
-
-[[package]]
-name = "fenv"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
-
-[[package]]
-name = "float"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "fenv 0.1.0",
- "platform 0.1.0",
-]
-
-[[package]]
-name = "fnmatch"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
-
 [[package]]
 name = "fuchsia-zircon"
 version = "0.3.3"
@@ -163,34 +90,6 @@ name = "fuchsia-zircon-sys"
 version = "0.3.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
-[[package]]
-name = "grp"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
-
-[[package]]
-name = "in_h"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
- "sys_socket 0.1.0",
-]
-
-[[package]]
-name = "inttypes"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "ctype 0.1.0",
- "errno 0.1.0",
- "platform 0.1.0",
- "stdlib 0.1.0",
-]
-
 [[package]]
 name = "itoa"
 version = "0.4.2"
@@ -198,10 +97,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "lazy_static"
-version = "1.0.2"
+version = "1.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "spin 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "spin 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -209,14 +109,6 @@ name = "libc"
 version = "0.2.42"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
-[[package]]
-name = "locale"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
-
 [[package]]
 name = "log"
 version = "0.3.9"
@@ -233,23 +125,6 @@ dependencies = [
  "cfg-if 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
-[[package]]
-name = "netinet"
-version = "0.1.0"
-dependencies = [
- "in_h 0.1.0",
-]
-
-[[package]]
-name = "platform"
-version = "0.1.0"
-dependencies = [
- "ralloc 1.0.0",
- "redox_syscall 0.1.40 (git+https://gitlab.redox-os.org/redox-os/syscall.git?branch=relibc)",
- "sc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "spin 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
 [[package]]
 name = "proc-macro2"
 version = "0.2.3"
@@ -258,16 +133,6 @@ dependencies = [
  "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
-[[package]]
-name = "pwd"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "errno 0.1.0",
- "fcntl 0.1.0",
- "platform 0.1.0",
-]
-
 [[package]]
 name = "quote"
 version = "0.3.15"
@@ -301,7 +166,7 @@ dependencies = [
 
 [[package]]
 name = "rand"
-version = "0.5.4"
+version = "0.5.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -334,46 +199,15 @@ dependencies = [
 name = "relibc"
 version = "0.1.0"
 dependencies = [
- "arpainet 0.1.0",
  "cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
  "compiler_builtins 0.1.0 (git+https://github.com/rust-lang-nursery/compiler-builtins.git)",
- "ctype 0.1.0",
- "dirent 0.1.0",
- "errno 0.1.0",
- "fcntl 0.1.0",
- "fenv 0.1.0",
- "float 0.1.0",
- "fnmatch 0.1.0",
- "grp 0.1.0",
- "inttypes 0.1.0",
- "locale 0.1.0",
- "netinet 0.1.0",
- "platform 0.1.0",
- "pwd 0.1.0",
- "semaphore 0.1.0",
- "setjmp 0.1.0",
- "signal 0.1.0",
- "stdio 0.1.0",
- "stdlib 0.1.0",
- "string 0.1.0",
- "strings 0.1.0",
- "sys_ioctl 0.1.0",
- "sys_mman 0.1.0",
- "sys_resource 0.1.0",
- "sys_select 0.1.0",
- "sys_socket 0.1.0",
- "sys_stat 0.1.0",
- "sys_time 0.1.0",
- "sys_times 0.1.0",
- "sys_un 0.1.0",
- "sys_utsname 0.1.0",
- "sys_wait 0.1.0",
- "termios 0.1.0",
- "time 0.1.0",
- "unistd 0.1.0",
- "utime 0.1.0",
- "wchar 0.1.0",
- "wctype 0.1.0",
+ "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "ralloc 1.0.0",
+ "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "redox_syscall 0.1.40 (git+https://gitlab.redox-os.org/redox-os/syscall.git?branch=relibc)",
+ "sc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "spin 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "va_list 0.1.0",
 ]
 
 [[package]]
@@ -389,14 +223,6 @@ name = "sc"
 version = "0.2.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
-[[package]]
-name = "semaphore"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
-
 [[package]]
 name = "serde"
 version = "1.0.70"
@@ -434,22 +260,9 @@ dependencies = [
  "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
-[[package]]
-name = "setjmp"
-version = "0.1.0"
-
-[[package]]
-name = "signal"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "errno 0.1.0",
- "platform 0.1.0",
-]
-
 [[package]]
 name = "spin"
-version = "0.4.8"
+version = "0.4.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -470,53 +283,6 @@ dependencies = [
  "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
-[[package]]
-name = "stdio"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "errno 0.1.0",
- "fcntl 0.1.0",
- "lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "platform 0.1.0",
- "string 0.1.0",
- "va_list 0.1.0",
-]
-
-[[package]]
-name = "stdlib"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "ctype 0.1.0",
- "errno 0.1.0",
- "fcntl 0.1.0",
- "platform 0.1.0",
- "rand 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "string 0.1.0",
- "time 0.1.0",
- "unistd 0.1.0",
- "wchar 0.1.0",
-]
-
-[[package]]
-name = "string"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "errno 0.1.0",
- "platform 0.1.0",
- "signal 0.1.0",
-]
-
-[[package]]
-name = "strings"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
-
 [[package]]
 name = "strsim"
 version = "0.7.0"
@@ -540,98 +306,6 @@ dependencies = [
  "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
-[[package]]
-name = "sys_ioctl"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
-
-[[package]]
-name = "sys_mman"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
-
-[[package]]
-name = "sys_resource"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
- "sys_time 0.1.0",
-]
-
-[[package]]
-name = "sys_select"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
-
-[[package]]
-name = "sys_socket"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
-
-[[package]]
-name = "sys_stat"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "fcntl 0.1.0",
- "platform 0.1.0",
-]
-
-[[package]]
-name = "sys_time"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
-
-[[package]]
-name = "sys_times"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
-
-[[package]]
-name = "sys_un"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
- "sys_socket 0.1.0",
-]
-
-[[package]]
-name = "sys_utsname"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
-
-[[package]]
-name = "sys_wait"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
- "sys_resource 0.1.0",
-]
-
 [[package]]
 name = "tempdir"
 version = "0.3.7"
@@ -651,14 +325,6 @@ dependencies = [
  "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
-[[package]]
-name = "termios"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
-
 [[package]]
 name = "textwrap"
 version = "0.10.0"
@@ -667,15 +333,6 @@ dependencies = [
  "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
-[[package]]
-name = "time"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "errno 0.1.0",
- "platform 0.1.0",
-]
-
 [[package]]
 name = "toml"
 version = "0.4.6"
@@ -704,26 +361,6 @@ name = "unicode-xid"
 version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
-[[package]]
-name = "unistd"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "errno 0.1.0",
- "platform 0.1.0",
- "stdio 0.1.0",
- "string 0.1.0",
- "sys_time 0.1.0",
-]
-
-[[package]]
-name = "utime"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
-
 [[package]]
 name = "va_list"
 version = "0.1.0"
@@ -744,24 +381,9 @@ version = "0.8.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
-name = "wchar"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "errno 0.1.0",
- "platform 0.1.0",
- "stdio 0.1.0",
- "time 0.1.0",
- "va_list 0.1.0",
-]
-
-[[package]]
-name = "wctype"
-version = "0.1.0"
-dependencies = [
- "cbindgen 0.5.2",
- "platform 0.1.0",
-]
+name = "version_check"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "winapi"
@@ -794,14 +416,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
 "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
 "checksum itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5adb58558dcd1d786b5f0bd15f3226ee23486e24b7b58304b60f64dc68e62606"
-"checksum lazy_static 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fb497c35d362b6a331cfd94956a07fc2c78a4604cdbee844a81170386b996dd3"
+"checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7"
 "checksum libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "b685088df2b950fccadf07a7187c8ef846a959c142338a48f9dc0b94517eb5f1"
 "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
 "checksum log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "61bd98ae7f7b754bc53dca7d44b604f733c6bba044ea6f41bc8d89272d8161d2"
 "checksum proc-macro2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cd07deb3c6d1d9ff827999c7f9b04cdfd66b1b17ae508e14fe47b620f2282ae0"
 "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
 "checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5"
-"checksum rand 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "12397506224b2f93e6664ffc4f664b29be8208e5157d3d90b44f09b5fae470ea"
+"checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c"
 "checksum rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "edecf0f94da5551fc9b492093e30b041a891657db7940ee221f9d2f66e82eef2"
 "checksum redox_syscall 0.1.40 (git+https://gitlab.redox-os.org/redox-os/syscall.git?branch=relibc)" = "<none>"
 "checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1"
@@ -812,7 +434,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum serde_derive 1.0.21 (registry+https://github.com/rust-lang/crates.io-index)" = "652bc323d694dc925829725ec6c890156d8e70ae5202919869cb00fe2eff3788"
 "checksum serde_derive_internals 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32f1926285523b2db55df263d2aa4eb69ddcfa7a7eade6430323637866b513ab"
 "checksum serde_json 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c6908c7b925cd6c590358a4034de93dbddb20c45e1d021931459fd419bf0e2"
-"checksum spin 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14db77c5b914df6d6173dda9a3b3f5937bd802934fa5edaf934df06a3491e56f"
+"checksum spin 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "37b5646825922b96b5d7d676b5bb3458a54498e96ed7b0ce09dc43a07038fea4"
 "checksum standalone-quote 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dcedac1d6d98e7e9d1d6e628f5635af9566688ae5f6cea70a3976f495ae8d839"
 "checksum standalone-syn 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "115808f5187c07c23cb93eee49d542fae54c6e8285d3a24c6ff683fcde9243db"
 "checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550"
@@ -827,6 +449,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
 "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
 "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a"
+"checksum version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7716c242968ee87e5542f8021178248f267f295a5c4803beae8b8b7fd9bc6051"
 "checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd"
 "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
 "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"

+ 16 - 39
Cargo.toml

@@ -8,56 +8,33 @@ name = "c"
 crate-type = ["staticlib"]
 
 [workspace]
-members = ["src/crt0"]
+members = ["src/crt0", "cbindgen"]
 
 [build-dependencies]
 cc = "1.0.17"
 
 [dependencies]
-arpainet = { path = "src/arpainet" }
-ctype = { path = "src/ctype" }
-dirent = { path = "src/dirent" }
-errno = { path = "src/errno" }
-fcntl = { path = "src/fcntl" }
-fenv = { path = "src/fenv" }
-float = { path = "src/float" }
-fnmatch = { path = "src/fnmatch" }
-grp = { path = "src/grp" }
-inttypes = { path = "src/inttypes" }
-locale = { path = "src/locale" }
-netinet = { path = "src/netinet" }
-platform = { path = "src/platform" }
-pwd = { path = "src/pwd" }
-semaphore = { path = "src/semaphore" }
-setjmp = { path = "src/setjmp" }
-signal = { path = "src/signal" }
-stdio = { path = "src/stdio" }
-stdlib = { path = "src/stdlib" }
-string = { path = "src/string" }
-strings = { path = "src/strings" }
-sys_ioctl = { path = "src/sys_ioctl" }
-sys_mman = { path = "src/sys_mman" }
-sys_resource = { path = "src/sys_resource" }
-sys_select = { path = "src/sys_select" }
-sys_socket = { path = "src/sys_socket" }
-sys_stat = { path = "src/sys_stat" }
-sys_time = { path = "src/sys_time" }
-sys_times = { path = "src/sys_times" }
-sys_un = { path = "src/sys_un" }
-sys_utsname = { path = "src/sys_utsname" }
-sys_wait = { path = "src/sys_wait" }
-termios = { path = "src/termios" }
-time = { path = "src/time" }
-unistd = { path = "src/unistd" }
-utime = { path = "src/utime" }
-wchar = { path = "src/wchar" }
-wctype = { path = "src/wctype" }
+lazy_static = { version = "*", features = ["nightly", "spin_no_std"] }
+rand = { version = "0.5.2", default-features = false }
+va_list = { path = "va_list", features = ["no_std"] }
 
 [dependencies.compiler_builtins]
 git = "https://github.com/rust-lang-nursery/compiler-builtins.git"
 default-features = false
 features = ["no-lang-items", "mangled-names"]
 
+[dependencies.ralloc]
+path = "ralloc"
+default-features = false
+optional = true
+
+[target.'cfg(target_os = "linux")'.dependencies]
+sc = "0.2"
+
+[target.'cfg(target_os = "redox")'.dependencies]
+redox_syscall = { git = "https://gitlab.redox-os.org/redox-os/syscall.git", branch = "relibc" }
+spin = "0.4"
+
 [profile.dev]
 panic = "abort"
 

+ 5 - 0
Makefile

@@ -45,6 +45,11 @@ install: all
 	cp -rv "openlibm/src"/*.h "$(DESTDIR)/include"
 	cp -v "$(BUILD)/openlibm/libopenlibm.a" "$(DESTDIR)/lib/libm.a"
 
+header:
+	mkdir -p header
+	./header.sh
+	touch header
+
 libc: $(BUILD)/release/libc.a $(BUILD)/release/crt0.o
 
 libm: $(BUILD)/openlibm/libopenlibm.a

+ 15 - 15
build.rs

@@ -1,22 +1,22 @@
 extern crate cc;
 
-use std::env;
+// use std::env;
 
 fn main() {
-    let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
-
-    cc::Build::new()
-        .flag("-nostdinc")
-        .flag("-nostdlib")
-        .flag("-I")
-        .flag(&format!("{}/include", crate_dir))
-        .flag("-fno-stack-protector")
-        .file("src/c/dlmalloc.c")
-        .file("src/c/fcntl.c")
-        .file("src/c/stack_chk.c")
-        .file("src/c/stdio.c")
-        .file("src/c/unistd.c")
-        .compile("relibc_c");
+    // let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
+    //
+    // cc::Build::new()
+    //     .flag("-nostdinc")
+    //     .flag("-nostdlib")
+    //     .flag("-I")
+    //     .flag(&format!("{}/include", crate_dir))
+    //     .flag("-fno-stack-protector")
+    //     .file("src/c/dlmalloc.c")
+    //     .file("src/c/fcntl.c")
+    //     .file("src/c/stack_chk.c")
+    //     .file("src/c/stdio.c")
+    //     .file("src/c/unistd.c")
+    //     .compile("relibc_c");
 
     println!("cargo:rustc-link-lib=static=relibc_c");
 }

+ 16 - 0
header.sh

@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+set -ex
+
+header="$(realpath header)"
+cbindgen="$(realpath cbindgen)"
+
+for config in src/header/*/cbindgen.toml
+do
+    dir="$(dirname "$config")"
+    name="$(basename "$dir")"
+    pushd "$dir"
+    cargo run --release --manifest-path "$cbindgen/Cargo.toml" -- \
+        -c cbindgen.toml -o "$header/$name.h" mod.rs
+    popd
+done

+ 0 - 14
src/arpainet/Cargo.toml

@@ -1,14 +0,0 @@
-[package]
-name = "arpainet"
-version = "0.1.0"
-authors = ["Jeremy Soller <[email protected]>"]
-build = "build.rs"
-
-[build-dependencies]
-cbindgen = { path = "../../cbindgen" }
-
-[dependencies]
-platform = { path = "../platform" }
-errno = { path = "../errno" }
-sys_socket = { path = "../sys_socket" }
-netinet = { path = "../netinet" }

+ 0 - 11
src/arpainet/build.rs

@@ -1,11 +0,0 @@
-extern crate cbindgen;
-
-use std::{env, fs};
-
-fn main() {
-    let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
-    fs::create_dir_all("../../target/include").expect("failed to create include directory");
-    cbindgen::generate(crate_dir)
-        .expect("failed to generate bindings")
-        .write_to_file("../../target/include/arpa/inet.h");
-}

+ 1 - 2
src/crt0/Cargo.toml

@@ -8,5 +8,4 @@ name = "crt0"
 crate-type = ["staticlib"]
 
 [dependencies]
-platform = { path = "../platform" }
-stdio = { path = "../stdio" }
+relibc = { path = "../.." }

+ 4 - 2
src/crt0/src/lib.rs

@@ -9,8 +9,10 @@
 #![feature(lang_items)]
 
 extern crate alloc;
-extern crate platform;
-extern crate stdio;
+extern crate relibc;
+
+use relibc::platform;
+use relibc::header::stdio;
 
 use alloc::Vec;
 use core::ptr;

+ 0 - 11
src/ctype/Cargo.toml

@@ -1,11 +0,0 @@
-[package]
-name = "ctype"
-version = "0.1.0"
-authors = ["Jeremy Soller <[email protected]>"]
-build = "build.rs"
-
-[build-dependencies]
-cbindgen = { path = "../../cbindgen" }
-
-[dependencies]
-platform = { path = "../platform" }

+ 0 - 11
src/ctype/build.rs

@@ -1,11 +0,0 @@
-extern crate cbindgen;
-
-use std::{env, fs};
-
-fn main() {
-    let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
-    fs::create_dir_all("../../target/include").expect("failed to create include directory");
-    cbindgen::generate(crate_dir)
-        .expect("failed to generate bindings")
-        .write_to_file("../../target/include/ctype.h");
-}

+ 0 - 15
src/dirent/Cargo.toml

@@ -1,15 +0,0 @@
-[package]
-name = "dirent"
-version = "0.1.0"
-authors = ["jD91mZM2 <[email protected]>"]
-build = "build.rs"
-
-[build-dependencies]
-cbindgen = { path = "../../cbindgen" }
-
-[dependencies]
-errno = { path = "../errno" }
-fcntl = { path = "../fcntl" }
-platform = { path = "../platform" }
-stdio = { path = "../stdio" }
-unistd = { path = "../unistd" }

+ 0 - 11
src/dirent/build.rs

@@ -1,11 +0,0 @@
-extern crate cbindgen;
-
-use std::{env, fs};
-
-fn main() {
-    let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
-    fs::create_dir_all("../../target/include").expect("failed to create include directory");
-    cbindgen::generate(crate_dir)
-        .expect("failed to generate bindings")
-        .write_to_file("../../target/include/dirent.h");
-}

+ 0 - 11
src/errno/Cargo.toml

@@ -1,11 +0,0 @@
-[package]
-name = "errno"
-version = "0.1.0"
-authors = ["Alex Lyon <[email protected]>"]
-build = "build.rs"
-
-[build-dependencies]
-cbindgen = { path = "../../cbindgen" }
-
-[dependencies]
-platform = { path = "../platform" }

+ 0 - 11
src/errno/build.rs

@@ -1,11 +0,0 @@
-extern crate cbindgen;
-
-use std::{env, fs};
-
-fn main() {
-    let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
-    fs::create_dir_all("../../target/include").expect("failed to create include directory");
-    cbindgen::generate(crate_dir)
-        .expect("failed to generate bindings")
-        .write_to_file("../../target/include/errno.h");
-}

+ 0 - 11
src/fcntl/Cargo.toml

@@ -1,11 +0,0 @@
-[package]
-name = "fcntl"
-version = "0.1.0"
-authors = ["Jeremy Soller <[email protected]>"]
-build = "build.rs"
-
-[build-dependencies]
-cbindgen = { path = "../../cbindgen" }
-
-[dependencies]
-platform = { path = "../platform" }

+ 0 - 11
src/fcntl/build.rs

@@ -1,11 +0,0 @@
-extern crate cbindgen;
-
-use std::{env, fs};
-
-fn main() {
-    let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
-    fs::create_dir_all("../../target/include").expect("failed to create include directory");
-    cbindgen::generate(crate_dir)
-        .expect("failed to generate bindings")
-        .write_to_file("../../target/include/fcntl.h");
-}

+ 0 - 10
src/fenv/Cargo.toml

@@ -1,10 +0,0 @@
-[package]
-name = "fenv"
-version = "0.1.0"
-authors = ["Dan Robertson <[email protected]>"]
-
-[build-dependencies]
-cbindgen = { path = "../../cbindgen" }
-
-[dependencies]
-platform = { path = "../platform" }

+ 0 - 11
src/fenv/build.rs

@@ -1,11 +0,0 @@
-extern crate cbindgen;
-
-use std::{env, fs};
-
-fn main() {
-    let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
-    fs::create_dir_all("../../target/include").expect("failed to create include directory");
-    cbindgen::generate(crate_dir)
-        .expect("failed to generate bindings")
-        .write_to_file("../../target/include/fenv.h");
-}

+ 0 - 11
src/float/Cargo.toml

@@ -1,11 +0,0 @@
-[package]
-name = "float"
-version = "0.1.0"
-authors = ["Dan Robertson <[email protected]>"]
-
-[build-dependencies]
-cbindgen = { path = "../../cbindgen" }
-
-[dependencies]
-platform = { path = "../platform" }
-fenv = { path = "../fenv" }

+ 0 - 11
src/float/build.rs

@@ -1,11 +0,0 @@
-extern crate cbindgen;
-
-use std::{env, fs};
-
-fn main() {
-    let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
-    fs::create_dir_all("../../target/include").expect("failed to create include directory");
-    cbindgen::generate(crate_dir)
-        .expect("failed to generate bindings")
-        .write_to_file("../../target/include/float.h");
-}

+ 0 - 10
src/fnmatch/Cargo.toml

@@ -1,10 +0,0 @@
-[package]
-name = "fnmatch"
-version = "0.1.0"
-authors = ["jD91mZM2 <[email protected]>"]
-
-[build-dependencies]
-cbindgen = { path = "../../cbindgen" }
-
-[dependencies]
-platform = { path = "../platform" }

+ 0 - 11
src/fnmatch/build.rs

@@ -1,11 +0,0 @@
-extern crate cbindgen;
-
-use std::{env, fs};
-
-fn main() {
-    let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
-    fs::create_dir_all("../../target/include").expect("failed to create include directory");
-    cbindgen::generate(crate_dir)
-      .expect("failed to generate bindings")
-      .write_to_file("../../target/include/fnmatch.h");
-}

+ 0 - 11
src/grp/Cargo.toml

@@ -1,11 +0,0 @@
-[package]
-name = "grp"
-version = "0.1.0"
-authors = ["Jeremy Soller <[email protected]>"]
-build = "build.rs"
-
-[build-dependencies]
-cbindgen = { path = "../../cbindgen" }
-
-[dependencies]
-platform = { path = "../platform" }

+ 0 - 11
src/grp/build.rs

@@ -1,11 +0,0 @@
-extern crate cbindgen;
-
-use std::{env, fs};
-
-fn main() {
-    let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set");
-    fs::create_dir_all("../../target/include").expect("failed to create include directory");
-    cbindgen::generate(crate_dir)
-        .expect("failed to generate bindings")
-        .write_to_file("../../target/include/grp.h");
-}

+ 0 - 0
src/template/cbindgen.toml → src/header/_template/cbindgen.toml


+ 0 - 0
src/template/src/lib.rs → src/header/_template/mod.rs


+ 0 - 0
src/todo/aio/lib.rs → src/header/_todo/aio/lib.rs


+ 0 - 0
src/todo/oldlib/dns/answer.rs → src/header/_todo/oldlib/dns/answer.rs


+ 0 - 0
src/todo/oldlib/dns/mod.rs → src/header/_todo/oldlib/dns/mod.rs


+ 0 - 0
src/todo/oldlib/dns/query.rs → src/header/_todo/oldlib/dns/query.rs


+ 0 - 0
src/todo/oldlib/event.rs → src/header/_todo/oldlib/event.rs


+ 0 - 0
src/todo/oldlib/file.rs → src/header/_todo/oldlib/file.rs


+ 0 - 0
src/todo/oldlib/folder.rs → src/header/_todo/oldlib/folder.rs


+ 0 - 0
src/todo/oldlib/hostname.rs → src/header/_todo/oldlib/hostname.rs


+ 0 - 0
src/todo/oldlib/lib.rs → src/header/_todo/oldlib/lib.rs


+ 0 - 0
src/todo/oldlib/macros.rs → src/header/_todo/oldlib/macros.rs


+ 0 - 0
src/todo/oldlib/mallocnull.rs → src/header/_todo/oldlib/mallocnull.rs


+ 0 - 0
src/todo/oldlib/netdb.rs → src/header/_todo/oldlib/netdb.rs


+ 0 - 0
src/todo/oldlib/process.rs → src/header/_todo/oldlib/process.rs


+ 0 - 0
src/todo/oldlib/rawfile.rs → src/header/_todo/oldlib/rawfile.rs


+ 0 - 0
src/todo/oldlib/redox.rs → src/header/_todo/oldlib/redox.rs


+ 0 - 0
src/todo/oldlib/socket.rs → src/header/_todo/oldlib/socket.rs


+ 0 - 0
src/todo/oldlib/termios.rs → src/header/_todo/oldlib/termios.rs


+ 0 - 0
src/todo/oldlib/time.rs → src/header/_todo/oldlib/time.rs


+ 0 - 0
src/todo/oldlib/types.rs → src/header/_todo/oldlib/types.rs


+ 0 - 0
src/todo/oldlib/unimpl.rs → src/header/_todo/oldlib/unimpl.rs


+ 0 - 0
src/todo/oldlib/user.rs → src/header/_todo/oldlib/user.rs


+ 0 - 0
src/todo/pthread/lib.rs → src/header/_todo/pthread/lib.rs


+ 0 - 0
src/todo/wctype/lib.rs → src/header/_todo/wctype/lib.rs


+ 1 - 1
src/arpainet/cbindgen.toml → src/header/arpa_inet/cbindgen.toml

@@ -1,5 +1,5 @@
 sys_includes = ["stddef.h", "sys/socket.h", "netinet/in.h"]
-include_guard = "_ARPAINET_H"
+include_guard = "_ARPA_INET_H"
 language = "C"
 style = "Tag"
 

+ 6 - 14
src/arpainet/src/lib.rs → src/header/arpa_inet/mod.rs

@@ -1,20 +1,12 @@
-//! arpainet implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/arpainet.h.html
-
-#![no_std]
-#![feature(alloc)]
-
-#[macro_use]
-extern crate alloc;
-
-extern crate errno;
-extern crate netinet;
-extern crate platform;
-extern crate sys_socket;
+//! arpa/inet implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/arpainet.h.html
 
 use core::str::FromStr;
 use core::{mem, ptr, slice, str};
-use errno::*;
-use netinet::in_h::in_addr;
+
+use header::errno::*;
+use header::netinet_in::in_addr;
+use header::sys_socket;
+use platform;
 use platform::c_str;
 use platform::types::*;
 

+ 0 - 0
src/ctype/cbindgen.toml → src/header/ctype/cbindgen.toml


+ 1 - 4
src/ctype/src/lib.rs → src/header/ctype/mod.rs

@@ -1,9 +1,6 @@
 //! ctype implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/ctype.h.html
 
-#![no_std]
-
-extern crate platform;
-
+use platform;
 use platform::types::*;
 
 #[no_mangle]

+ 0 - 0
src/dirent/cbindgen.toml → src/header/dirent/cbindgen.toml


+ 2 - 10
src/dirent/src/lib.rs → src/header/dirent/mod.rs

@@ -1,17 +1,9 @@
 //! dirent implementation following http://pubs.opengroup.org/onlinepubs/009695399/basedefs/dirent.h.html
 
-#![no_std]
-#![feature(alloc)]
-
-extern crate alloc;
-extern crate errno;
-extern crate fcntl;
-extern crate platform;
-extern crate stdio;
-extern crate unistd;
-
 use alloc::boxed::Box;
 use core::{mem, ptr};
+
+use header::{errno, fcntl, stdio, unistd};
 use platform::{Pal, Sys};
 use platform::types::*;
 

+ 0 - 0
src/errno/cbindgen.toml → src/header/errno/cbindgen.toml


+ 1 - 4
src/errno/src/lib.rs → src/header/errno/mod.rs

@@ -1,9 +1,6 @@
 //! errno implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/errno.h.html
 
-#![no_std]
-
-extern crate platform;
-
+use platform;
 use platform::types::*;
 
 #[no_mangle]

+ 0 - 0
src/fcntl/cbindgen.toml → src/header/fcntl/cbindgen.toml


+ 0 - 0
src/fcntl/src/linux.rs → src/header/fcntl/linux.rs


+ 1 - 4
src/fcntl/src/lib.rs → src/header/fcntl/mod.rs

@@ -1,9 +1,6 @@
 //! fcntl implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/fcntl.h.html
 
-#![no_std]
-
-extern crate platform;
-
+use platform;
 use platform::{Pal, Sys};
 use platform::types::*;
 

+ 0 - 0
src/fcntl/src/redox.rs → src/header/fcntl/redox.rs


+ 0 - 0
src/fenv/cbindgen.toml → src/header/fenv/cbindgen.toml


+ 1 - 4
src/fenv/src/lib.rs → src/header/fenv/mod.rs

@@ -1,10 +1,7 @@
 //! fenv.h implementation for Redox, following
 //! http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fenv.h.html
 
-#![no_std]
-
-extern crate platform;
-
+use platform;
 use platform::types::*;
 
 pub const FE_ALL_EXCEPT: c_int = 0;

+ 0 - 0
src/float/cbindgen.toml → src/header/float/cbindgen.toml


+ 2 - 6
src/float/src/lib.rs → src/header/float/mod.rs

@@ -1,12 +1,8 @@
 //! float.h implementation for Redox, following
 //! http://pubs.opengroup.org/onlinepubs/7908799/xsh/float.h.html
 
-#![no_std]
-
-extern crate fenv;
-extern crate platform;
-
-use fenv::{fegetround, FE_TONEAREST};
+use header::fenv::{fegetround, FE_TONEAREST};
+use platform;
 use platform::types::*;
 
 pub const FLT_RADIX: c_int = 2;

+ 0 - 0
src/fnmatch/cbindgen.toml → src/header/fnmatch/cbindgen.toml


+ 2 - 5
src/fnmatch/src/lib.rs → src/header/fnmatch/mod.rs

@@ -1,11 +1,8 @@
 //! fnmatch implementation
-#![no_std]
-#![feature(alloc)]
-
-extern crate alloc;
-extern crate platform;
 
 use alloc::vec::Vec;
+
+use platform;
 use platform::types::*;
 
 pub const FNM_NOMATCH: c_int = 1;

+ 0 - 0
src/grp/cbindgen.toml → src/header/grp/cbindgen.toml


+ 1 - 4
src/grp/src/lib.rs → src/header/grp/mod.rs

@@ -1,9 +1,6 @@
 //! grp implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/grp.h.html
 
-#![no_std]
-
-extern crate platform;
-
+use platform;
 use platform::types::*;
 
 #[repr(C)]

+ 0 - 0
src/inttypes/cbindgen.toml → src/header/inttypes/cbindgen.toml


+ 3 - 9
src/inttypes/src/lib.rs → src/header/inttypes/mod.rs

@@ -1,12 +1,6 @@
-#![no_std]
-
-#[macro_use]
-extern crate stdlib;
-extern crate ctype;
-extern crate errno;
-extern crate platform;
-
-use errno::*;
+use header::{ctype, stdlib};
+use header::errno::*;
+use platform;
 use platform::types::*;
 
 #[no_mangle]

+ 0 - 0
src/locale/cbindgen.toml → src/header/locale/cbindgen.toml


+ 2 - 5
src/locale/src/lib.rs → src/header/locale/mod.rs

@@ -1,11 +1,8 @@
 //! locale implementation for Redox, following http://pubs.opengroup.org/onlinepubs/7908799/xsh/locale.h.html
 
-#![no_std]
-#![feature(alloc)]
-
-extern crate platform;
-
 use core::ptr;
+
+use platform;
 use platform::types::*;
 
 const EMPTY_PTR: *const c_char = "\0" as *const _ as *const c_char;

+ 38 - 0
src/header/mod.rs

@@ -0,0 +1,38 @@
+pub mod arpa_inet;
+pub mod ctype;
+pub mod dirent;
+pub mod errno;
+pub mod fcntl;
+pub mod fenv;
+pub mod float;
+pub mod fnmatch;
+pub mod grp;
+pub mod inttypes;
+pub mod locale;
+pub mod netinet_in;
+pub mod pwd;
+pub mod semaphore;
+pub mod sgtty;
+pub mod signal;
+pub mod stdio;
+pub mod stdlib;
+pub mod string;
+pub mod strings;
+pub mod sys_file;
+pub mod sys_ioctl;
+pub mod sys_mman;
+pub mod sys_resource;
+pub mod sys_select;
+pub mod sys_socket;
+pub mod sys_stat;
+pub mod sys_time;
+pub mod sys_times;
+pub mod sys_un;
+pub mod sys_utsname;
+pub mod sys_wait;
+pub mod termios;
+pub mod time;
+pub mod unistd;
+pub mod utime;
+pub mod wchar;
+pub mod wctype;

+ 0 - 0
src/netinet/Cargo.toml → src/header/netinet_in/Cargo.toml


+ 0 - 0
src/netinet/in/cbindgen.toml → src/header/netinet_in/cbindgen.toml


+ 2 - 6
src/netinet/in/src/lib.rs → src/header/netinet_in/mod.rs

@@ -1,12 +1,8 @@
-#![no_std]
-
 #![allow(non_camel_case_types)]
 
-extern crate platform;
-extern crate sys_socket;
-
+use header::sys_socket::{self, sa_family_t, sockaddr};
+use platform;
 use platform::types::*;
-use sys_socket::{sa_family_t, sockaddr};
 
 pub type in_addr_t = u32;
 pub type in_port_t = u16;

+ 0 - 0
src/pwd/cbindgen.toml → src/header/pwd/cbindgen.toml


+ 3 - 8
src/pwd/src/lib.rs → src/header/pwd/mod.rs

@@ -1,15 +1,10 @@
 //! pwd implementation for relibc
 
-#![no_std]
-#![feature(alloc)]
-
-extern crate alloc;
-extern crate errno;
-extern crate fcntl;
-extern crate platform;
-
 use alloc::vec::Vec;
 use core::ptr;
+
+use header::{errno, fcntl};
+use platform;
 use platform::{Pal, Sys};
 use platform::types::*;
 use platform::RawFile;

+ 0 - 0
src/semaphore/cbindgen.toml → src/header/semaphore/cbindgen.toml


+ 1 - 4
src/semaphore/src/lib.rs → src/header/semaphore/mod.rs

@@ -1,7 +1,4 @@
-#![no_std]
-
-extern crate platform;
-
+use platform;
 use platform::types::*;
 
 #[repr(C)]

+ 0 - 0
src/setjmp/Cargo.toml → src/header/setjmp/Cargo.toml


+ 0 - 0
src/setjmp/src/impl/README.md → src/header/setjmp/src/impl/README.md


+ 0 - 0
src/setjmp/src/impl/aarch64/longjmp.s → src/header/setjmp/src/impl/aarch64/longjmp.s


+ 0 - 0
src/setjmp/src/impl/aarch64/setjmp.s → src/header/setjmp/src/impl/aarch64/setjmp.s


+ 0 - 0
src/setjmp/src/impl/arm/longjmp.s → src/header/setjmp/src/impl/arm/longjmp.s


+ 0 - 0
src/setjmp/src/impl/arm/setjmp.s → src/header/setjmp/src/impl/arm/setjmp.s


+ 0 - 0
src/setjmp/src/impl/i386/longjmp.s → src/header/setjmp/src/impl/i386/longjmp.s


+ 0 - 0
src/setjmp/src/impl/i386/setjmp.s → src/header/setjmp/src/impl/i386/setjmp.s


+ 0 - 0
src/setjmp/src/impl/m68k/longjmp.s → src/header/setjmp/src/impl/m68k/longjmp.s


+ 0 - 0
src/setjmp/src/impl/m68k/setjmp.s → src/header/setjmp/src/impl/m68k/setjmp.s


+ 0 - 0
src/setjmp/src/impl/microblaze/longjmp.s → src/header/setjmp/src/impl/microblaze/longjmp.s


+ 0 - 0
src/setjmp/src/impl/microblaze/setjmp.s → src/header/setjmp/src/impl/microblaze/setjmp.s


+ 0 - 0
src/setjmp/src/impl/mips/longjmp.S → src/header/setjmp/src/impl/mips/longjmp.S


+ 0 - 0
src/setjmp/src/impl/mips/setjmp.S → src/header/setjmp/src/impl/mips/setjmp.S


+ 0 - 0
src/setjmp/src/impl/mips64/longjmp.S → src/header/setjmp/src/impl/mips64/longjmp.S


+ 0 - 0
src/setjmp/src/impl/mips64/setjmp.S → src/header/setjmp/src/impl/mips64/setjmp.S


+ 0 - 0
src/setjmp/src/impl/mipsn32/longjmp.S → src/header/setjmp/src/impl/mipsn32/longjmp.S


+ 0 - 0
src/setjmp/src/impl/mipsn32/setjmp.S → src/header/setjmp/src/impl/mipsn32/setjmp.S


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio