diff options
author | xbe <xbe@machine> | 2014-03-15 23:24:34 -0700 |
---|---|---|
committer | xbe <xbe@machine> | 2014-03-16 12:14:15 -0700 |
commit | c93a22197bfdb9323fa176eca4d30f307963ce9d (patch) | |
tree | bf1545ee595378c06f652b77e1418bac590b0e0c | |
parent | 51bbf6a006901fd3877c6abe3d5d67de74401310 (diff) | |
download | micropython-c93a22197bfdb9323fa176eca4d30f307963ce9d.tar.gz micropython-c93a22197bfdb9323fa176eca4d30f307963ce9d.zip |
unix: Clean up includes.
Remove unnecessary includes. Add includes that improve portability.
-rw-r--r-- | unix/file.c | 3 | ||||
-rw-r--r-- | unix/gccollect.c | 1 | ||||
-rw-r--r-- | unix/main.c | 5 | ||||
-rw-r--r-- | unix/socket.c | 3 | ||||
-rw-r--r-- | unix/time.c | 1 |
5 files changed, 9 insertions, 4 deletions
diff --git a/unix/file.c b/unix/file.c index 444a05d491..258aa65d50 100644 --- a/unix/file.c +++ b/unix/file.c @@ -1,7 +1,8 @@ -#include <string.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> +#include <sys/stat.h> +#include <sys/types.h> #include "nlr.h" #include "misc.h" diff --git a/unix/gccollect.c b/unix/gccollect.c index 6fb08fad1e..450a697787 100644 --- a/unix/gccollect.c +++ b/unix/gccollect.c @@ -1,4 +1,3 @@ -#include <stdint.h> #include <stdio.h> #include "misc.h" diff --git a/unix/main.c b/unix/main.c index 6a7b44ff84..eecec301bf 100644 --- a/unix/main.c +++ b/unix/main.c @@ -1,8 +1,11 @@ #include <stdint.h> +#include <stdbool.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdarg.h> +#include <sys/stat.h> +#include <sys/types.h> #include "nlr.h" #include "misc.h" @@ -391,8 +394,6 @@ int main(int argc, char **argv) { return 0; } -#include <sys/stat.h> - uint mp_import_stat(const char *path) { struct stat st; if (stat(path, &st) == 0) { diff --git a/unix/socket.c b/unix/socket.c index a9cf4a81a0..d720275192 100644 --- a/unix/socket.c +++ b/unix/socket.c @@ -2,7 +2,10 @@ #include <assert.h> #include <string.h> #include <unistd.h> +#include <sys/stat.h> +#include <sys/types.h> #include <sys/socket.h> +#include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <errno.h> diff --git a/unix/time.c b/unix/time.c index 1abd7cff39..7d25b3dd56 100644 --- a/unix/time.c +++ b/unix/time.c @@ -1,3 +1,4 @@ +#include <unistd.h> #include <string.h> #include <time.h> #include <sys/time.h> |