Commit graph

13 commits

Author SHA1 Message Date
George Koehler 36f16b0cb8 Cut down some clang warnings
Edit C code to reduce warnings from clang.  Most warnings are for
implicit declarations of functions, but some warnings want me to add
parentheses or curly braces, or to cast arguments for printf().

Make a few other changes, like declaring float_cst() in h/con_float to
be static, and using C99 bool in ego/ra/makeitems.c and
ego/share/makecldef.c.  Such changes don't silence warnings; I make
such changes while I silence warnings in the same file.  In
float_cst(), rename parameter `str` to `float_str`, so it doesn't
share a name with the global variable `str`.

Remove `const` from `newmodule(const char *)` in mach/proto/as to
silence a warning.  I wrongly added the `const` in d347207.

For warnings about implicit declarations of functions, the fix is to
declare the function before calling it.  For example, my OpenBSD
system needs <sys/wait.h> to declare wait().

In util/int, add "whatever.h" to declare more functions.  Remove old
declarations from "mem.h", to prefer the newer declarations of the
same functions in "data.h" and "stack.h".
2019-10-30 18:36:38 -04:00
carl 5a18b85b3f + ANSI C conversion 2019-03-17 22:46:32 +08:00
David Given 5f83fd85dc Don't try to use acct() on cygwin (which doesn't support it). Fixes: #111 2018-09-01 10:41:31 +02:00
George Koehler a000c62808 Get moncalls.c to compile on OpenBSD.
Remove some declarations (not all correct) and #include <errno.h>,
<time.h>, and <unistd.h> to get the correct declarations.

Disable mount(2), umount(2), and stime(2) because BSD (around
4.3BSD-Reno) lost compatibility with these Unix v7 functions.
2018-06-10 19:05:42 -04:00
ceriel 5c83e7dbb5 Header --> Id 1994-06-24 11:31:16 +00:00
ceriel d58d691472 Fixed V7 and SYS_V utime problem 1992-07-10 15:22:01 +00:00
ceriel df1ed9426d Do not use '#endif/#else xxx'; it is not allowed for ANSI C 1991-12-17 15:28:58 +00:00
ceriel a93813c1f6 Made acceptable for our ANSI C compiler 1991-12-03 11:03:58 +00:00
ceriel 49a64df069 do not depend on sys/wait.h, it does not always exist 1991-10-25 11:18:29 +00:00
ceriel f994b0bf84 Fixed MON instruction: getpid() was wrong 1990-01-31 10:54:26 +00:00
ceriel 3107e638f8 some more speed-up changes 1989-11-22 13:38:37 +00:00
ceriel 3868470366 many speed-up changes, resulting in 20-25% speedup, and fixed
serious floating point handling bug
1989-11-13 15:36:12 +00:00
dick a717832bfb Initial entry 1988-06-22 16:57:09 +00:00