Skip to content

Commit

Permalink
First cut at consolidated core::os module built on core::libc.
Browse files Browse the repository at this point in the history
  • Loading branch information
graydon committed Mar 3, 2012
1 parent 87c14f1 commit dafd649
Show file tree
Hide file tree
Showing 8 changed files with 1,270 additions and 13 deletions.
3 changes: 3 additions & 0 deletions src/etc/libc.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <wchar.h>

/* c99 */
#include <inttypes.h>
Expand Down Expand Up @@ -53,6 +54,8 @@ void c95_types() {
put_type("clock_t", clock_t);
put_type("time_t", time_t);

put_type("wchar_t", wchar_t);

printf(" }\n");
}

Expand Down
6 changes: 6 additions & 0 deletions src/libcore/core.rc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ mod to_str;
// Runtime and language-primitive support

mod libc;

// Rename when transition done.
#[path = "os.rs"]
mod new_os;
mod path;

mod ctypes;
mod math;
mod cmath;
Expand Down
6 changes: 3 additions & 3 deletions src/libcore/core.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Top-level, visible-everywhere definitions.

// Export type option as a synonym for option and export the some and none
// enum constructors.
// Export various ubiquitous types, constructors, methods.

import option::{some, none};
import option = option::t;
import path = path::path;
import vec::vec_len;
export option, some, none, vec_len;
export path, option, some, none, vec_len;

// Export the log levels as global constants. Higher levels mean
// more-verbosity. Error is the bottom level, default logging level is
Expand Down
Loading

0 comments on commit dafd649

Please sign in to comment.