mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix build on QNX
This makes ksh 93u+m build on the following system: $ uname -a QNX qnx 6.5.0 2010/07/09-14:44:03EDT x86pc x86 Thanks to polarhome.com for providing the QNX shell account. There are a number of regressions left to work out: arrays.sh[636]: copying a large array fails bracket.sh[129]: /tmp/ksh93.shtests.1753215026.6923/bracket.C/original should be older than /tmp/ksh93.shtests.1753215026.6923/bracket.C/newer bracket.sh[132]: /tmp/ksh93.shtests.1753215026.6923/bracket.C/newer should be newer than /tmp/ksh93.shtests.1753215026.6923/bracket.C/original builtins.sh[683]: real_t1 not found after parent directory renamed in subshell functions.sh[1023]: cannot handle comsub depth > 256 in function io.sh[252]: <# not working for pipes io.sh[337]: read -n3 from pipe not working io.sh[346]: read -n3 from fifo failed -- expected 'a', got 'abc' io.sh[349]: read -n1 from fifo failed -- expected 'b', got 'd' io.sh[379]: should have timed out io.sh[380]: line1 should be 'prompt1: ' io.sh[381]: line2 should be line2 io.sh[382]: line3 should be 'prompt2: ' io.sh[406]: LC_ALL=C read -n2 from pipe 'a bcd' failed -- expected 'a bcd', got 'ab cd' io.sh[406]: LC_ALL=C.UTF-8 read -n2 from pipe 'a bcd' failed -- expected 'a bcd', got 'ab cd' jobs.sh[86]: warning: skipping subshell job control test due to non-compliant 'ps' pty.sh[105]: POSIX sh 026(C): line 120: expected "(Stopped|Suspended)", got EOF pty.sh[128]: POSIX sh 028(C): line 143: expected "(Stopped|Suspended) \(SIGTTIN\)", got EOF pty.sh[151]: POSIX sh 029(C): line 166: expected "(Stopped|Suspended) \(SIGTTOU\)", got EOF signal.sh[310]: kill -TERM $$ failed, required termination by signal 'EXIT' signal.sh[310]: kill -VTALRM $$ failed, required termination by signal 'EXIT' signal.sh[310]: kill -PIPE $$ failed, required termination by signal 'EXIT' (The io.sh failures mean libast sfpkrd() is not working.) src/lib/libast/obsolete/spawn.c: - Removed. Didn't compile due to wrong number of arguments to spawnve(2), but is obsolete and unused. src/lib/libast/comp/localeconv.c: - The initialisation of two static 'struct lconv' variables was done in a way that depended on OS headers declaring the struct members in a certain order. This holds on most systems, but not on QNX, and POSIX does not actually specify the order at all: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/locale.h.html So each member must be initialised by name. But C89 does not support initialising struct members by name, so we have to do it using an initialiser function that simply assigns the values. src/lib/libast/comp/spawnveg.c: - Fix for systems without either P_DETACH or _P_DETACH. src/lib/libast/features/vmalloc, src/lib/libast/vmalloc/vmmopen.c, src/lib/libast/Mamfile: - Add test for sys/shm.h header. If it doesn't exist, as it doesn't on QNX, use the stub vmmapopen() as the real one won't compile. (Mamfile: Add dependency on FEATURE/vmalloc to vmmopen.c.) src/lib/libast/vmalloc/malloc.c: - Remove superfluous externs that are already provided by either AST or system headers. The 'void cfree' extern caused a build failure on QNX because cfree() is of type int on QNX. src/lib/libast/comp/conf.tab: - Remove check for _map_spawnve; src/lib/libast/RELEASE says it was removed.
This commit is contained in:
parent
cd35ec6048
commit
21d00ffb6c
11 changed files with 45 additions and 248 deletions
|
@ -998,36 +998,6 @@ extern Mstats_t mstats()
|
|||
|
||||
#define setregmax(n)
|
||||
|
||||
#undef calloc
|
||||
extern Void_t* calloc _ARG_((size_t, size_t));
|
||||
|
||||
#undef cfree
|
||||
extern void cfree _ARG_((Void_t*));
|
||||
|
||||
#undef free
|
||||
extern void free _ARG_((Void_t*));
|
||||
|
||||
#undef malloc
|
||||
extern Void_t* malloc _ARG_((size_t));
|
||||
|
||||
#if _lib_memalign
|
||||
#undef memalign
|
||||
extern Void_t* memalign _ARG_((size_t, size_t));
|
||||
#endif
|
||||
|
||||
#if _lib_pvalloc
|
||||
#undef pvalloc
|
||||
extern Void_t* pvalloc _ARG_((size_t));
|
||||
#endif
|
||||
|
||||
#undef realloc
|
||||
extern Void_t* realloc _ARG_((Void_t*, size_t));
|
||||
|
||||
#if _lib_valloc
|
||||
#undef valloc
|
||||
extern Void_t* valloc _ARG_((size_t));
|
||||
#endif
|
||||
|
||||
#if defined(__EXPORT__)
|
||||
#define extern __EXPORT__
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue