Commit Graph

251 Commits

Author SHA1 Message Date
mrg 1fcf7be45f - use -Wno-error=implicit-fallthrough with GCC7. 2019-02-04 04:05:15 +00:00
sevan 1f921aefc9 Add -l to SYNOPSIS 2018-08-26 22:52:34 +00:00
kamil d6d5f49c60 Change typ of tilde_ok from int to unsigned int in ksh(1)
UBSan can detect that during switching a login to root there is unportable
left shift operation:

$ su -
Password:
/public/src.git/bin/ksh/eval.c:598:13: runtime error: left shift of 1073741824 by 1 places cannot be represented in type 'int'
#

Sponsored by <The NetBSD Foundation>
2018-06-12 14:13:55 +00:00
kamil b9cf72ac86 ksh: Remove symbol clash with libc
Rename local function glob() to ksh_glob().
This is needed for installing interceptors in sanitizers.

Sponsored by <The NetBSD Foundation>
2018-06-03 16:09:31 +00:00
kamil 3eb9a6b77e ksh: Remove symbol clash with libc
Rename local function twalk() to ksh_twak().
This is needed for installing interceptors in sanitizers.

Sponsored by <The NetBSD Foundation>
2018-06-03 12:18:29 +00:00
kamil 0f2b5450fb Stop using the register keyword in ksh(1)
ksh also does some strange things with it, like put it in argument lists.

No functional change intended.

PR bin/53237 ksh: remove register keyword by Nia Alarie
2018-05-08 16:37:59 +00:00
kamil 081e832953 ksh: Rename a local function tsearch to mytsearch
This removes a clash with well-known libc function tsearch(3) from POSIX.

This allows to build ksh against MSan.

The new name might not be perfect, but long term ksh should be switched to
the libc version.

Sponsored by <The NetBSD Foundation>
2018-01-24 09:53:20 +00:00
kamil 6d8c9dfa44 ksh: Rename a local function tdelete to mytdelete
This removes a clash with well-known libc function tdelete(3) from POSIX.

This allows to build ksh against MSan.

The new name might not be perfect, but long term ksh should be switched to
the libc version.

Sponsored by <The NetBSD Foundation>
2018-01-24 09:21:20 +00:00
maya ee3bb8535b Use 0600 as the mode for histfile here too.
pointed out by John D. Baker in PR bin/52480
2018-01-17 00:29:22 +00:00
joerg da656e3d1c Kill enough K&R cruft to build with clang again. 2017-07-01 23:12:08 +00:00
kamil 6327936549 ksh: Eliminate dead function x_complete_word() 2017-06-30 05:18:36 +00:00
kamil dda96fab20 ksh: Eliminate dead code from expand.h 2017-06-30 05:14:12 +00:00
kamil 00cd1c66a2 ksh: Drop old hack for FreeBSD 1.1.5 and CLK_TCK 2017-06-30 04:44:46 +00:00
kamil dd8a75d57f ksh: Upgrade to C99 <stdbool.h>
This shell already used C99 functions.
2017-06-30 04:41:19 +00:00
kamil c2a517fe40 ksh: Eliminate dead MEM_DEBUG sections, there is missing code for it
MEM_DEBUG used to contain malloc(3) debugging facilities.
2017-06-30 04:30:26 +00:00
kamil a5a27bbf6f ksh: Drop support for OSes without POSIX sigaction(2) 2017-06-30 04:22:22 +00:00
kamil 2537c199ea ksh: Drop support for OSes that don't map /dev/fd 2017-06-30 04:11:57 +00:00
kamil 91e15fa768 ksh: Drop old hack fo SunOS 4.1.x (1990-1994) 2017-06-30 04:01:48 +00:00
kamil fac4b39487 ksh: Drop support for systems without <sys/stat.h>
In future the order of includes will be normalized with KNF.

No functional change intended.
2017-06-30 03:56:12 +00:00
kamil 1dacfa0dd2 ksh: Drop support for systems with broken <sys/time.h> / <time.h> 2017-06-30 03:43:57 +00:00
kamil e6ed5dea98 ksh: Drop support for systems without POSIX lstat(2) 2017-06-30 03:35:16 +00:00
kamil a396fc9936 ksh: Drop support for systems without POSIX <sys/wait.h> 2017-06-30 03:32:28 +00:00
kamil 3e5f067b68 ksh: Drop support for systems with broken times(3)
This fallback code wouldn't work anyway.

times(3) is an obsolete interface by getrusage(2) and gettimeofday(2).
In future it will be swiched to more modern interfaces.

No functional change intended.
2017-06-30 03:23:18 +00:00
kamil 2c22621e8f ksh: Assume ANSI C prototypes 2017-06-30 02:51:14 +00:00
kamil 81c962c859 ksh: Drop support for systems without functional waitpid(2) 2017-06-30 02:38:09 +00:00
kamil 8ea5ae4cd1 ksh: Drop support for systems without POSIX signal routines 2017-06-30 02:20:47 +00:00
kamil 306d025987 ksh: Drop support for systems without implementation of EINTR
These systems weren't handled anyway.
2017-06-30 02:13:29 +00:00
kamil 51ebc97c9d ksh: Drop support for systems without handling shebang 2017-06-30 02:06:59 +00:00
kamil 5c93126131 ksh: Drop support for OSes without POSIX types
Assume available: mode_t, off_t, pid_t, uid_t, rlim_t, sigset_t.
2017-06-30 02:02:41 +00:00
kamil 9d5663e055 ksh: Drop support for systems without <sys/wait.h> 2017-06-30 01:56:34 +00:00
kamil 3e63fce1f9 ksh: Drop ksh_wait.h that reinvents <sys/wait.h> (POSIX header)
Switch jobs.c to <sys/wait.h>.

No functional change intended.
2017-06-30 01:52:34 +00:00
kamil d0aa393796 ksh: Drop support for systems without gid_t 2017-06-30 01:36:30 +00:00
kamil c6c3f8f1f5 ksh: Drop support for systems without clock_t type 2017-06-23 00:35:20 +00:00
kamil b831372d44 ksh: Replace homegrown int_least32_t with the C99 version 2017-06-23 00:29:42 +00:00
kamil 730f723665 ksh: Drop support for systems that return void for closedir(2) 2017-06-23 00:20:22 +00:00
kamil acc2fa794c ksh: Use ANSI C varargs, drop support for older version <varargs.h> 2017-06-23 00:18:01 +00:00
kamil cb1c866326 ksh: Remove remnant hack for SCO UNIX in tty code 2017-06-23 00:11:01 +00:00
kamil a761aa7e3f ksh: Remove support for NeXT Operating System 2017-06-23 00:09:36 +00:00
kamil 0e8072bdff ksh: Drop the latest ifdef for BSD4.1 and eliminate dead code around it 2017-06-23 00:07:15 +00:00
kamil c65b0df2e9 ksh: Drop BSD4.3 temporary hack in tty code 2017-06-23 00:04:20 +00:00
kamil 14ae4d8526 ksh: Drop support for UNIX V7-style signal routines 2017-06-23 00:00:58 +00:00
kamil 0a9965d29a ksh: Drop fallback for BSD4.2 signal routines 2017-06-22 23:59:28 +00:00
kamil 53e78cf286 ksh: Remove fallback to BSD4.1 signal routines 2017-06-22 23:56:24 +00:00
kamil 3b7ff6c991 ksh: Drop support for systems without mmap(2) 2017-06-22 23:54:13 +00:00
kamil 52b3355e26 ksh: Drop support for systems without dup2(2) 2017-06-22 23:50:24 +00:00
kamil 237b342911 ksh: Drop support for ISC UNIX 2017-06-22 23:47:29 +00:00
kamil eed5a31e9b ksh: Drop support for systems without offsetof(3) 2017-06-22 23:42:35 +00:00
kamil bdcebfe8f5 ksh: Drop support for systems without <limits.h> 2017-06-22 23:38:49 +00:00
kamil accac1300c ksh: Drop support for systems without <fcntl.h> 2017-06-22 23:37:00 +00:00
kamil fb30a30908 ksh: Drop support for systems without memmove(3) and stop using bcopy(3) 2017-06-22 23:33:36 +00:00