diff options
Diffstat (limited to 'otherlibs/unix')
-rw-r--r-- | otherlibs/unix/dup2.c | 2 | ||||
-rw-r--r-- | otherlibs/unix/envir.c | 2 | ||||
-rw-r--r-- | otherlibs/unix/errmsg.c | 2 | ||||
-rw-r--r-- | otherlibs/unix/exit.c | 2 | ||||
-rw-r--r-- | otherlibs/unix/fcntl.c | 8 | ||||
-rw-r--r-- | otherlibs/unix/getcwd.c | 2 | ||||
-rw-r--r-- | otherlibs/unix/gethostname.c | 6 | ||||
-rw-r--r-- | otherlibs/unix/itimer.c | 4 | ||||
-rw-r--r-- | otherlibs/unix/listen.c | 2 | ||||
-rw-r--r-- | otherlibs/unix/lockf.c | 2 | ||||
-rw-r--r-- | otherlibs/unix/mkfifo.c | 2 | ||||
-rw-r--r-- | otherlibs/unix/nice.c | 2 | ||||
-rw-r--r-- | otherlibs/unix/putenv.c | 2 | ||||
-rw-r--r-- | otherlibs/unix/sockopt.c | 4 | ||||
-rw-r--r-- | otherlibs/unix/termios.c | 12 | ||||
-rw-r--r-- | otherlibs/unix/wait.c | 2 |
16 files changed, 28 insertions, 28 deletions
diff --git a/otherlibs/unix/dup2.c b/otherlibs/unix/dup2.c index e7cecf835..96e841ff3 100644 --- a/otherlibs/unix/dup2.c +++ b/otherlibs/unix/dup2.c @@ -38,7 +38,7 @@ static int do_dup2(int fd1, int fd2) return res; } -value unix_dup2(value fd1, value fd2) /* ML */ +value unix_dup2(value fd1, value fd2) { close(Int_val(fd2)); if (do_dup2(Int_val(fd1), Int_val(fd2)) == -1) uerror("dup2", Nothing); diff --git a/otherlibs/unix/envir.c b/otherlibs/unix/envir.c index b5bdcbfcf..ff9b80d66 100644 --- a/otherlibs/unix/envir.c +++ b/otherlibs/unix/envir.c @@ -17,7 +17,7 @@ extern char ** environ; -value unix_environment(void) +value unix_environment(void) /* ML */ { return copy_string_array(environ); } diff --git a/otherlibs/unix/errmsg.c b/otherlibs/unix/errmsg.c index cf1930ff8..65d51a725 100644 --- a/otherlibs/unix/errmsg.c +++ b/otherlibs/unix/errmsg.c @@ -22,7 +22,7 @@ extern int error_table[]; extern char * strerror(int); -value unix_error_message(value err) +value unix_error_message(value err) /* ML */ { int errnum; errnum = Is_block(err) ? Int_val(Field(err, 0)) : error_table[Int_val(err)]; diff --git a/otherlibs/unix/exit.c b/otherlibs/unix/exit.c index 247ef611f..4511d4366 100644 --- a/otherlibs/unix/exit.c +++ b/otherlibs/unix/exit.c @@ -19,7 +19,7 @@ value unix_exit(value n) /* ML */ { _exit(Int_val(n)); return Val_unit; /* never reached, but suppress warnings */ - /* from smart compilers */ + /* from smart compilers */ } diff --git a/otherlibs/unix/fcntl.c b/otherlibs/unix/fcntl.c index 259431fc2..d52dbc733 100644 --- a/otherlibs/unix/fcntl.c +++ b/otherlibs/unix/fcntl.c @@ -23,7 +23,7 @@ #define O_NONBLOCK O_NDELAY #endif -value unix_set_nonblock(value fd) +value unix_set_nonblock(value fd) /* ML */ { int retcode; retcode = fcntl(Int_val(fd), F_GETFL, 0); @@ -33,7 +33,7 @@ value unix_set_nonblock(value fd) return Val_unit; } -value unix_clear_nonblock(value fd) +value unix_clear_nonblock(value fd) /* ML */ { int retcode; retcode = fcntl(Int_val(fd), F_GETFL, 0); @@ -45,7 +45,7 @@ value unix_clear_nonblock(value fd) #ifdef FD_CLOEXEC -value unix_set_close_on_exec(value fd) +value unix_set_close_on_exec(value fd) /* ML */ { int retcode; retcode = fcntl(Int_val(fd), F_GETFD, 0); @@ -55,7 +55,7 @@ value unix_set_close_on_exec(value fd) return Val_unit; } -value unix_clear_close_on_exec(value fd) +value unix_clear_close_on_exec(value fd) /* ML */ { int retcode; retcode = fcntl(Int_val(fd), F_GETFD, 0); diff --git a/otherlibs/unix/getcwd.c b/otherlibs/unix/getcwd.c index 2d1c1156c..dd5194428 100644 --- a/otherlibs/unix/getcwd.c +++ b/otherlibs/unix/getcwd.c @@ -16,7 +16,7 @@ #include <alloc.h> #include "unixsupport.h" -#ifndef _WIN32 +#if !defined (_WIN32) && !macintosh #include <sys/param.h> #endif diff --git a/otherlibs/unix/gethostname.c b/otherlibs/unix/gethostname.c index 1513bfaba..a85346d22 100644 --- a/otherlibs/unix/gethostname.c +++ b/otherlibs/unix/gethostname.c @@ -14,10 +14,10 @@ #include <mlvalues.h> #include <alloc.h> -#ifndef _WIN32 -#include <sys/param.h> -#else +#if defined (_WIN32) #include <winsock.h> +#elsif !macintosh +#include <sys/param.h> #endif #include "unixsupport.h" diff --git a/otherlibs/unix/itimer.c b/otherlibs/unix/itimer.c index 472510f0d..b3e298afc 100644 --- a/otherlibs/unix/itimer.c +++ b/otherlibs/unix/itimer.c @@ -37,7 +37,7 @@ static value unix_convert_itimer(struct itimerval *tp) static int itimers[3] = { ITIMER_REAL, ITIMER_VIRTUAL, ITIMER_PROF }; -value unix_setitimer(value which, value newval) +value unix_setitimer(value which, value newval) /* ML */ { struct itimerval new, old; Set_timeval(new.it_interval, Double_field(newval, 0)); @@ -47,7 +47,7 @@ value unix_setitimer(value which, value newval) return unix_convert_itimer(&old); } -value unix_getitimer(value which) +value unix_getitimer(value which) /* ML */ { struct itimerval val; if (getitimer(itimers[Int_val(which)], &val) == -1) diff --git a/otherlibs/unix/listen.c b/otherlibs/unix/listen.c index 39c846995..15bccc0e8 100644 --- a/otherlibs/unix/listen.c +++ b/otherlibs/unix/listen.c @@ -19,7 +19,7 @@ #include <sys/socket.h> -value unix_listen(value sock, value backlog) +value unix_listen(value sock, value backlog) /* ML */ { if (listen(Int_val(sock), Int_val(backlog)) == -1) uerror("listen", Nothing); return Val_unit; diff --git a/otherlibs/unix/lockf.c b/otherlibs/unix/lockf.c index 88536feb2..5a8ea4369 100644 --- a/otherlibs/unix/lockf.c +++ b/otherlibs/unix/lockf.c @@ -93,7 +93,7 @@ static int lock_command_table[] = { F_ULOCK, F_LOCK, F_TLOCK, F_TEST, F_LOCK, F_TLOCK }; -value unix_lockf(value fd, value cmd, value span) /* ML */ +value unix_lockf(value fd, value cmd, value span) { if (lockf(Int_val(fd), lock_command_table[Int_val(cmd)], Long_val(span)) == -1) uerror("lockf", Nothing); diff --git a/otherlibs/unix/mkfifo.c b/otherlibs/unix/mkfifo.c index 36a812029..708a75199 100644 --- a/otherlibs/unix/mkfifo.c +++ b/otherlibs/unix/mkfifo.c @@ -19,7 +19,7 @@ #ifdef HAS_MKFIFO -value unix_mkfifo(value path, value mode) +value unix_mkfifo(value path, value mode) /* ML */ { if (mkfifo(String_val(path), Int_val(mode)) == -1) uerror("mkfifo", path); diff --git a/otherlibs/unix/nice.c b/otherlibs/unix/nice.c index 6f38d8213..c9ea81134 100644 --- a/otherlibs/unix/nice.c +++ b/otherlibs/unix/nice.c @@ -22,7 +22,7 @@ #include <sys/time.h> #include <sys/resource.h> -value unix_nice(value incr) +value unix_nice(value incr) /* ML */ { int prio; errno = 0; diff --git a/otherlibs/unix/putenv.c b/otherlibs/unix/putenv.c index bb9462c55..33ab979a4 100644 --- a/otherlibs/unix/putenv.c +++ b/otherlibs/unix/putenv.c @@ -38,7 +38,7 @@ value unix_putenv(value name, value val) /* ML */ #else -value unix_putenv(value name, value val) /* ML */ +value unix_putenv(value name, value val) { invalid_argument("putenv not implemented"); } #endif diff --git a/otherlibs/unix/sockopt.c b/otherlibs/unix/sockopt.c index 6b46714d4..3fa4097b0 100644 --- a/otherlibs/unix/sockopt.c +++ b/otherlibs/unix/sockopt.c @@ -33,7 +33,7 @@ static int sockopt[] = { SO_DEBUG, SO_BROADCAST, SO_REUSEADDR, SO_KEEPALIVE, SO_DONTROUTE, SO_OOBINLINE }; -value unix_getsockopt(value socket, value option) +value unix_getsockopt(value socket, value option) /* ML */ { int optval; socklen_param_type optsize; @@ -45,7 +45,7 @@ value unix_getsockopt(value socket, value option) return Val_int(optval); } -value unix_setsockopt(value socket, value option, value status) +value unix_setsockopt(value socket, value option, value status) /* ML */ { int optval = Int_val(status); if (setsockopt(Int_val(socket), SOL_SOCKET, sockopt[Int_val(option)], diff --git a/otherlibs/unix/termios.c b/otherlibs/unix/termios.c index 00138e029..9a8b58616 100644 --- a/otherlibs/unix/termios.c +++ b/otherlibs/unix/termios.c @@ -229,7 +229,7 @@ static void decode_terminal_status(value *src) } } -value unix_tcgetattr(value fd) +value unix_tcgetattr(value fd) /* ML */ { value res; @@ -244,7 +244,7 @@ static int when_flag_table[] = { TCSANOW, TCSADRAIN, TCSAFLUSH }; -value unix_tcsetattr(value fd, value when, value arg) +value unix_tcsetattr(value fd, value when, value arg) /* ML */ { if (tcgetattr(Int_val(fd), &terminal_status) == -1) uerror("tcsetattr", Nothing); @@ -256,14 +256,14 @@ value unix_tcsetattr(value fd, value when, value arg) return Val_unit; } -value unix_tcsendbreak(value fd, value delay) +value unix_tcsendbreak(value fd, value delay) /* ML */ { if (tcsendbreak(Int_val(fd), Int_val(delay)) == -1) uerror("tcsendbreak", Nothing); return Val_unit; } -value unix_tcdrain(value fd) +value unix_tcdrain(value fd) /* ML */ { if (tcdrain(Int_val(fd)) == -1) uerror("tcdrain", Nothing); return Val_unit; @@ -273,7 +273,7 @@ static int queue_flag_table[] = { TCIFLUSH, TCOFLUSH, TCIOFLUSH }; -value unix_tcflush(value fd, value queue) +value unix_tcflush(value fd, value queue) /* ML */ { if (tcflush(Int_val(fd), queue_flag_table[Int_val(queue)]) == -1) uerror("tcflush", Nothing); @@ -284,7 +284,7 @@ static int action_flag_table[] = { TCOOFF, TCOON, TCIOFF, TCION }; -value unix_tcflow(value fd, value action) +value unix_tcflow(value fd, value action) /* ML */ { if (tcflow(Int_val(fd), action_flag_table[Int_val(action)]) == -1) uerror("tcflow", Nothing); diff --git a/otherlibs/unix/wait.c b/otherlibs/unix/wait.c index e38eba5e8..9e252a780 100644 --- a/otherlibs/unix/wait.c +++ b/otherlibs/unix/wait.c @@ -80,7 +80,7 @@ static int wait_flag_table[] = { WNOHANG, WUNTRACED }; -value unix_waitpid(value flags, value pid_req) +value unix_waitpid(value flags, value pid_req) /* ML */ { int pid, status; |