Commit graph

8002 commits

Author SHA1 Message Date
carl 98c5d1f0ee Add function prototypes. 2019-03-25 00:11:31 +08:00
carl ef3a6b3cc4 Add function prototypes. 2019-03-25 00:11:19 +08:00
carl 053c509fc9 Add function prototypes. 2019-03-25 00:10:58 +08:00
carl 2f84fc92cf Add function prototypes. 2019-03-25 00:10:45 +08:00
carl 2dd0d0f81b Add function prototypes. 2019-03-25 00:10:32 +08:00
carl 143da61d13 Add function prototypes. 2019-03-25 00:10:20 +08:00
carl dac3d0b10c Add function prototypes. 2019-03-25 00:10:10 +08:00
carl a915b76300 Fix crash upon error. 2019-03-25 00:09:42 +08:00
carl 98d8505c6e arch.h flag fixing 2019-03-25 00:07:43 +08:00
carl 8457ec6791 Object module now uses ANSI C I/O 2019-03-25 00:07:12 +08:00
carl 97cb247b39 Merge remote-tracking branch 'upstream/default' into default
# Conflicts:
#	util/arch/archiver.c
2019-03-25 00:04:41 +08:00
carl 5ec9de401d * More ANSI C portability fixes. 2019-03-24 23:53:13 +08:00
carl f7e4fac687 Revert "* Adapt to more ANSI C"
This reverts commit da0e0ac257.
2019-03-24 23:39:04 +08:00
carl a58ad2bc31 * Adapt to more ANSI C 2019-03-24 23:36:52 +08:00
carl da0e0ac257 * Adapt to more ANSI C 2019-03-24 23:35:59 +08:00
carl 56e64a1fd0 Merge remote-tracking branch 'upstream/default' into carl-ansi-part1
# Conflicts:
#	util/arch/archiver.c
#	util/led/finish.c
#	util/led/output.c
2019-03-24 21:42:56 +08:00
carl 75394c93e1 Better ANSI C portability. 2019-03-24 17:40:27 +08:00
carl 9b6e1774ea ANSI C version
More portability fixes.
2019-03-24 17:37:49 +08:00
carl 53fa893738 ANSI C version
More portability fixes.
2019-03-24 17:11:56 +08:00
carl 7063301f8c Add additional defines for compilation. 2019-03-24 17:09:29 +08:00
carl 086a2ac9ab Add additional defines for compilation. 2019-03-24 17:09:12 +08:00
carl c5f5bace63 Add additional defines for compilation. 2019-03-24 17:08:45 +08:00
David Given ae76564657
Merge pull request #183 from kernigh/kernigh-include
Include headers to declare functions
2019-03-23 12:31:32 +01:00
George Koehler bec236c108 Include more headers to declare functions.
This causes clang to give fewer warnings of implicit declarations of
functions.

In mach/pdp/cv/cv.c, rename wr_int2() to cv_int2() because it
conflicts with wr_int2() in <object.h>.

In util/ack, rename F_OK to F_TRANSFORM because it conflicts with F_OK
for access() in <unistd.h>.
2019-03-22 15:59:35 -04:00
George Koehler 84f65f7ce3 Raise _XOPEN_SOURCE from 500 to 700
In OpenBSD, _XOPEN_SOURCE 500 forces _POSIX_C_SOURCE down to 199506,
which hides the declarations of openat() and fdopendir() and causes
compiler warnings.

Don't set _POSIX_C_SOURCE, because _XOPEN_SOURCE may set
_POSIX_C_SOURCE to a different value.
2019-03-22 14:35:07 -04:00
George Koehler cdbff0dd1c Include <fcntl.h> or <unistd.h>
This silences some clang warnings of implicit declarations of
functions.  The `register int` silences a warning of implicit int.
2019-03-22 14:19:02 -04:00
George Koehler dd328215d8 Use %zu to print size_t count
This silences a compiler warning.
2019-03-22 14:09:50 -04:00
George Koehler f8cbe04447 Include <unistd.h> for lseek()
This unbreaks my build in OpenBSD.  The old `long lseek()` conflicts
with `off_t lseek()` in OpenBSD headers, because long and off_t are
different types.  Commit b4df26e caused "system.h" to include some
headers where OpenBSD declares lseek().

Manuals for lseek() say to #include <unistd.h>.  Do so to be portable
to systems where other headers don't declare lseek().
2019-03-22 13:18:07 -04:00
David Given 3f61c0d507
Merge pull request #181 from ccodere/carl-ansi-part1
More ANSI C conversion
2019-03-20 15:53:22 +01:00
carl b3814af1ba * Bugfix of "rename" across volumes, now simply copies the file instead. 2019-03-17 23:19:16 +08:00
carl de57335296 Try to update frontend driver. 2019-03-17 22:46:32 +08:00
carl 8b525f59c3 + ANSI C conversion 2019-03-17 22:46:32 +08:00
carl 3ac4504a5a + ANSI C conversion 2019-03-17 22:46:32 +08:00
carl 5a18b85b3f + ANSI C conversion 2019-03-17 22:46:32 +08:00
carl 75909230c9 + ANSI C conversion 2019-03-17 22:46:32 +08:00
carl 0df5d2f50b + Make it build with troff 2019-03-17 22:46:31 +08:00
carl 9f29c76c74 + Have the DEBUG version compile 2019-03-17 22:46:31 +08:00
carl 6bfac1d24d + Add sys_tmpnam() and sys_basename() 2019-03-17 22:46:31 +08:00
carl da71e5a018 Addition of tmpnam system function. 2019-03-17 22:46:31 +08:00
carl 91adc2849b + Have the DEBUG version compile 2019-03-17 22:46:31 +08:00
carl 9e93eb642b Better type checking on function callback. 2019-03-17 22:46:31 +08:00
David Given 43ea6e2bec
Merge pull request #177 from davidgiven/dtrg-8080
i80: Better peephole optimiser rules
2019-03-11 17:00:12 +01:00
David Given c59eae1429 Don't buffer overflow when trying to process source bytes with the high bit
set.
2019-03-11 13:50:30 +00:00
David Given 88fd7b3cdc Add a 'kill' pseudoinstruction to the 8080 assembler, which marks when the code
generator is finished with a register; use this to create some more effective
peephole optimiser rules.
2019-03-08 23:06:34 +01:00
David Given e2625813c9
Merge pull request #174 from ccodere/carl-ansi-part1
Carl ansi part1
2019-03-07 20:51:08 +01:00
carl 8f6073d446 + Better type checking in function tables. 2019-03-02 01:44:16 +08:00
carl 3867cfdaca + M2 Compiler ISO C90 compatibility
* Fixing of potential crash issue with function tables in compiler.
+ SYSTEM.h is now renamed to SYSTEMM2.h to avoid conflicts on non case sensitive filesystems.
2019-03-02 01:44:16 +08:00
carl 5f9a199257 CPP ISO C90 compatibility and conversion. 2019-03-02 01:44:16 +08:00
carl f371f452b5 Basic compiler is now ISO C90 compliant. 2019-03-02 01:44:16 +08:00
David Given ca3e272233
Merge pull request #173 from ccodere/carl-ansi-part1
Carl ansi part1
2019-02-25 23:23:04 +01:00