mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
Build dtksh on more OSs
This commit is contained in:
parent
208c1e4999
commit
e8cb780125
13 changed files with 40 additions and 12 deletions
|
@ -10,7 +10,7 @@ EXTRADIRS = types localized tttypes $(NSGMLSDIR) util
|
||||||
XCOMM some of these cannot be built on linux yet.
|
XCOMM some of these cannot be built on linux yet.
|
||||||
XCOMM dtksh dtinfo
|
XCOMM dtksh dtinfo
|
||||||
#if defined(LinuxArchitecture)
|
#if defined(LinuxArchitecture)
|
||||||
DTKSHDIR =
|
DTKSHDIR = dtksh
|
||||||
DTINFODIR =
|
DTINFODIR =
|
||||||
DTCMDIR = dtcm
|
DTCMDIR = dtcm
|
||||||
DTLOGINDIR = dtlogin
|
DTLOGINDIR = dtlogin
|
||||||
|
|
|
@ -61,16 +61,15 @@ EXTRA_INCLUDES = -I$(DTHELPSRC) -I$(DTPRINTSRC)
|
||||||
.NO_PARALLEL:
|
.NO_PARALLEL:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef LinuxArchitecture
|
||||||
|
SYS_LIBRARIES = -lm -ldl
|
||||||
|
#endif
|
||||||
|
|
||||||
#define IHaveSubdirs
|
#define IHaveSubdirs
|
||||||
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
|
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
|
||||||
|
|
||||||
#if defined(LinuxArchitecture)
|
|
||||||
SUBDIRS = examples
|
|
||||||
KSH93OBJ =
|
|
||||||
#else
|
|
||||||
SUBDIRS = examples ksh93
|
SUBDIRS = examples ksh93
|
||||||
KSH93OBJ = $(KSH93SRC)/ksh93.o
|
KSH93OBJ = $(KSH93SRC)/ksh93.o
|
||||||
#endif
|
|
||||||
|
|
||||||
MakeSubdirs($(SUBDIRS))
|
MakeSubdirs($(SUBDIRS))
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ ALL_SUBS = *
|
||||||
|
|
||||||
ksh93src:
|
ksh93src:
|
||||||
$(RM) $(SHIP_DIR)/$(ALL_SUBS)/$(ALL_SUBS)/BUILT; \
|
$(RM) $(SHIP_DIR)/$(ALL_SUBS)/$(ALL_SUBS)/BUILT; \
|
||||||
SHELL=$(KORNSHELL) CC=$(CC) CCFLAGS="$(CCFLAGS)" $(KORNSHELL) ship/shipin $(FORCE_SHIP)
|
SHELL=$(KORNSHELL) CC="$(CC)" CCFLAGS="$(CCFLAGS)" $(KORNSHELL) ship/shipin $(FORCE_SHIP)
|
||||||
|
|
||||||
ksh93.o: $(OBJS)
|
ksh93.o: $(OBJS)
|
||||||
$(LD) -r -o $@ $(OBJS)
|
$(LD) -r -o $@ $(OBJS)
|
||||||
|
|
|
@ -1103,7 +1103,7 @@ $inc
|
||||||
*) e='-e /[\\\\/]sys[\\\\/]'$x'\.h"/d' ;;
|
*) e='-e /[\\\\/]sys[\\\\/]'$x'\.h"/d' ;;
|
||||||
esac
|
esac
|
||||||
if $cc -E $tmp.c <&$nullin >$tmp.i
|
if $cc -E $tmp.c <&$nullin >$tmp.i
|
||||||
then i=`sed -e '/^#[line ]*[0-9][0-9]*[ ][ ]*"[\\\\/].*[\\\\/]'$x'\.h"/!d' $e -e s'/.*"\(.*\)".*/\1/' -e 's,\\\\,/,g' -e 's,///*,/,g' $tmp.i | sort -u`
|
then i=`sed -e '/^#[line ]*[0-9][0-9]*[ ][ ]*"[\\\\/].*[\\\\/]'$x'\.h"/!d' $e -e '/\/bits\//d' -e s'/.*"\(.*\)".*/\1/' -e 's,\\\\,/,g' -e 's,///*,/,g' $tmp.i | sort -u`
|
||||||
for i in $i
|
for i in $i
|
||||||
do break
|
do break
|
||||||
done
|
done
|
||||||
|
|
|
@ -235,7 +235,11 @@ OPEN_MAX_CEIL 50 AST XX 1 L OPEN_MAX
|
||||||
OS_VERSION 119 AES SC 1 FSU
|
OS_VERSION 119 AES SC 1 FSU
|
||||||
PAGESIZE 51 POSIX SC 1 L PAGE_SIZE 4096
|
PAGESIZE 51 POSIX SC 1 L PAGE_SIZE 4096
|
||||||
#if _lib_getpagesize
|
#if _lib_getpagesize
|
||||||
|
#if defined(linux)
|
||||||
|
extern int getpagesize(void);
|
||||||
|
#else
|
||||||
extern ssize_t getpagesize(void);
|
extern ssize_t getpagesize(void);
|
||||||
|
#endif
|
||||||
#define _LOCAL_PAGESIZE getpagesize()
|
#define _LOCAL_PAGESIZE getpagesize()
|
||||||
#endif
|
#endif
|
||||||
PAGE_SIZE 101 XOPEN SC 1 L PAGESIZE
|
PAGE_SIZE 101 XOPEN SC 1 L PAGESIZE
|
||||||
|
|
|
@ -239,7 +239,11 @@ OPEN_MAX_CEIL 50 AST XX 1 L OPEN_MAX
|
||||||
OS_VERSION 119 AES SC 1 FSU
|
OS_VERSION 119 AES SC 1 FSU
|
||||||
PAGESIZE 51 POSIX SC 1 L PAGE_SIZE 4096
|
PAGESIZE 51 POSIX SC 1 L PAGE_SIZE 4096
|
||||||
#if _lib_getpagesize
|
#if _lib_getpagesize
|
||||||
|
#if defined(linux)
|
||||||
|
extern int getpagesize(void);
|
||||||
|
#else
|
||||||
extern ssize_t getpagesize(void);
|
extern ssize_t getpagesize(void);
|
||||||
|
#endif
|
||||||
#define _LOCAL_PAGESIZE getpagesize()
|
#define _LOCAL_PAGESIZE getpagesize()
|
||||||
#endif
|
#endif
|
||||||
PAGE_SIZE 101 XOPEN SC 1 L PAGESIZE
|
PAGE_SIZE 101 XOPEN SC 1 L PAGESIZE
|
||||||
|
|
|
@ -5,10 +5,10 @@ lib _cleanup,BSDsetpgrp,atexit,bcopy,bzero,confstr,dirread,dup2,fchmod
|
||||||
lib fcntl,fnmatch,fork,fsync,getconf,getdents,getdirentries,getdtablesize
|
lib fcntl,fnmatch,fork,fsync,getconf,getdents,getdirentries,getdtablesize
|
||||||
lib getgroups,getpagesize,getrlimit,getuniverse,index,killpg,link
|
lib getgroups,getpagesize,getrlimit,getuniverse,index,killpg,link
|
||||||
lib localeconv,lstat,mbtowc,memccpy
|
lib localeconv,lstat,mbtowc,memccpy
|
||||||
lib memchr,memcmp,memcpy,memdup,memmove,memset,mkdir,mkfifo,mknod,mktemp
|
lib memchr,memcmp,memcpy,memmove,memset,mkdir,mkfifo,mknod,mktemp
|
||||||
lib mount,on_exit,onexit,opendir,pathconf,readlink,remove,rename,rindex
|
lib mount,on_exit,onexit,opendir,pathconf,readlink,remove,rename,rindex
|
||||||
lib rmdir,rewinddir,setlocale,setpgid,setpgrp,setpgrp2,setreuid,setsid
|
lib rmdir,rewinddir,setlocale,setpgid,setpgrp,setpgrp2,setreuid,setsid
|
||||||
lib setuid,sigaction,sigprocmask,sigsetmask,sigunblock,sigvec
|
lib setuid,sigaction,sigprocmask,sigsetmask,sigvec
|
||||||
lib socketpair,spawnve,spawnveg,strchr,strcoll,strdup,strerror,strrchr
|
lib socketpair,spawnve,spawnveg,strchr,strcoll,strdup,strerror,strrchr
|
||||||
lib strtod,strtol,strtoul,strxfrm,symlink,sysconf
|
lib strtod,strtol,strtoul,strxfrm,symlink,sysconf
|
||||||
lib telldir,tmpnam,tzset,universe,unlink,utime,vfork
|
lib telldir,tmpnam,tzset,universe,unlink,utime,vfork
|
||||||
|
|
|
@ -16,5 +16,7 @@ cat{
|
||||||
#else
|
#else
|
||||||
#undef ioctl
|
#undef ioctl
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(linux)
|
||||||
extern int ioctl(int, int, ...);
|
extern int ioctl(int, int, ...);
|
||||||
|
#endif
|
||||||
}end
|
}end
|
||||||
|
|
|
@ -121,9 +121,17 @@
|
||||||
* workaround botched headers that assume <stdio.h>
|
* workaround botched headers that assume <stdio.h>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(linux)
|
||||||
|
#ifndef __FILE
|
||||||
|
#define __FILE FILE
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(CSRG_BASED)
|
||||||
#ifndef FILE
|
#ifndef FILE
|
||||||
#define FILE Sfio_t
|
#define FILE Sfio_t
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* exit() support -- this matches shell exit codes
|
* exit() support -- this matches shell exit codes
|
||||||
|
|
|
@ -137,7 +137,9 @@
|
||||||
#define _SKIP_SFSTDIO_H
|
#define _SKIP_SFSTDIO_H
|
||||||
#else
|
#else
|
||||||
#define _SFSTDIO_H
|
#define _SFSTDIO_H
|
||||||
|
#if !defined(linux)
|
||||||
#define FILE int
|
#define FILE int
|
||||||
|
#endif
|
||||||
#if defined(__STDPP__directive) && defined(__STDPP__hide)
|
#if defined(__STDPP__directive) && defined(__STDPP__hide)
|
||||||
#if !_std_def_calloc
|
#if !_std_def_calloc
|
||||||
__STDPP__directive pragma pp:hide calloc
|
__STDPP__directive pragma pp:hide calloc
|
||||||
|
|
|
@ -149,9 +149,11 @@
|
||||||
#define _STDIO_INCLUDED 1
|
#define _STDIO_INCLUDED 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(CSRG_BASED)
|
||||||
#ifndef FILE
|
#ifndef FILE
|
||||||
#define FILE Sfio_t
|
#define FILE Sfio_t
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
typedef struct _sfio_ Sfile_t, Sfio_t, SFIO;
|
typedef struct _sfio_ Sfile_t, Sfio_t, SFIO;
|
||||||
|
|
|
@ -301,7 +301,7 @@ loop_fa :
|
||||||
GETARG(form,form,argf,args,char*,char*,'1',t_user,n_user);
|
GETARG(form,form,argf,args,char*,char*,'1',t_user,n_user);
|
||||||
if(!form)
|
if(!form)
|
||||||
form = "";
|
form = "";
|
||||||
#if defined(CSRG_BASED) && !defined(__LP64__)
|
#if (defined(CSRG_BASED) && !defined(__LP64__)) || (defined(linux) && !defined(__LP64__))
|
||||||
GETARG(argsp,argsp,argf,args,va_list*,va_list*,'2',t_user,n_user);
|
GETARG(argsp,argsp,argf,args,va_list*,va_list*,'2',t_user,n_user);
|
||||||
memcpy((Void_t*)(&(fa->args)), (Void_t*)(&args), sizeof(va_list));
|
memcpy((Void_t*)(&(fa->args)), (Void_t*)(&args), sizeof(va_list));
|
||||||
memcpy((Void_t*)(&args), (Void_t*)argsp, sizeof(va_list));
|
memcpy((Void_t*)(&args), (Void_t*)argsp, sizeof(va_list));
|
||||||
|
|
|
@ -1 +1,8 @@
|
||||||
lib lchmod,lchown
|
lib lchown
|
||||||
|
tst lib_lchmod note{ lchmod() in default lib(s) }end link{
|
||||||
|
#include <sys/stat.h>
|
||||||
|
main()
|
||||||
|
{ lchmod("/tmp/lchmod_test", 0755);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}end
|
||||||
|
|
Loading…
Reference in a new issue