Sfoglia il codice sorgente

stat is now autogenerated correctly

Paul Sajna 7 anni fa
parent
commit
76c4520cea
2 ha cambiato i file con 6 aggiunte e 7 eliminazioni
  1. 5 7
      src/stat/build.rs
  2. 1 0
      src/stat/cbindgen.toml

+ 5 - 7
src/stat/build.rs

@@ -3,11 +3,9 @@ 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/sys/stat.h");
-     */
+    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/sys/stat.h");
 }

+ 1 - 0
src/stat/cbindgen.toml

@@ -1,6 +1,7 @@
 sys_includes = ["sys/types.h"]
 include_guard = "_SYS_STAT_H"
 language = "C"
+style = "Tag"
 
 [enum]
 prefix_with_name = true