Commit graph

7973 commits

Author SHA1 Message Date
carl 7cb2b3de7f Fix syntax mistake in man page. 2019-05-11 00:51:42 +08:00
carl 2330d35ade * Fix compilation warning. 2019-05-11 00:49:10 +08:00
carl 8d6cfa7701 Fix possible buffer writer overflow 2019-03-31 01:14:49 +08:00
carl 715717a4f6 Read beyond buffer bugfix. 2019-03-31 00:53:09 +08:00
carl 4f2c482416 Buffer overflow memory errors. 2019-03-31 00:52:37 +08:00
carl 9bc3ffe6ec Buffer overflow memory errors. 2019-03-31 00:52:27 +08:00
carl 496795f0cf Fix memory overflow error. 2019-03-26 00:59:16 +08:00
carl a09e40cba3 Fix memory overflow error. 2019-03-26 00:58:56 +08:00
carl 415ec163a7 Fix tabs. 2019-03-26 00:58:36 +08:00
carl 7973e87b2f Additional check with NULL or empty string (now same behaviour as POSIX version) 2019-03-26 00:58:14 +08:00
carl 78899705d5 Bug of fseek and wrong setting of position. 2019-03-25 02:20:50 +08:00
carl 41fd51eeea Revert change. 2019-03-25 01:41:04 +08:00
carl efecff78b9 Add function prototypes. 2019-03-25 00:14:38 +08:00
carl 9979fb37d2 Add function prototypes. 2019-03-25 00:14:27 +08:00
carl 82cdc096b0 Add function prototypes. 2019-03-25 00:14:08 +08:00
carl f161a5867d Add function prototypes. 2019-03-25 00:13:56 +08:00
carl a6120c220e Fix buffer overflow issue. 2019-03-25 00:13:42 +08:00
carl dcc2be5e8c Add function prototypes. 2019-03-25 00:12:21 +08:00
carl 5295049b16 Add function prototypes. 2019-03-25 00:12:07 +08:00
carl 1636b9b52d Add function prototypes. 2019-03-25 00:11:55 +08:00
carl 180d3388d6 Add function prototypes. 2019-03-25 00:11:43 +08:00
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