From dddc44a59e3e393d5440a06e2b0535aeb1304f77 Mon Sep 17 00:00:00 2001 From: Robert de Bath Date: Sat, 23 Oct 2010 17:32:23 +0200 Subject: Import Dev86src-0.16.18.tar.gz --- libc/gtermcap/Makefile.old | 25 ------- libc/i386sys/Makefile | 2 +- libc/msdos/msdos.c | 13 ++-- libc/syscall/syscall.dev86.old | 160 ----------------------------------------- 4 files changed, 10 insertions(+), 190 deletions(-) delete mode 100644 libc/gtermcap/Makefile.old delete mode 100644 libc/syscall/syscall.dev86.old (limited to 'libc') diff --git a/libc/gtermcap/Makefile.old b/libc/gtermcap/Makefile.old deleted file mode 100644 index 453c47a..0000000 --- a/libc/gtermcap/Makefile.old +++ /dev/null @@ -1,25 +0,0 @@ -# -# Makefile for termcap functions -# - -override DEBUG=false -override PROFILE=false -#override CHECKER=false -JUMP_LIB=libtermcap - -TOPDIR=.. - -include $(TOPDIR)/Makeconfig -include $(TOPDIR)/Makerules - -override STATIC_LIB=$(STATIC_DIR)/libtermcap.a -override SHARED_LIB=$(SHARED_DIR)/libtermcap.a -override CHECKER_LIB=$(CHECKER_DIR)/libtermcap.a - -DIRS:= -SRCS = termcap.c tparam.c -ASMS= $(SRCS:.c=.s) -OBJS= $(SRCS:.c=.o) -ALIASES= - -include $(TOPDIR)/Maketargets diff --git a/libc/i386sys/Makefile b/libc/i386sys/Makefile index 665f71a..9de3232 100644 --- a/libc/i386sys/Makefile +++ b/libc/i386sys/Makefile @@ -12,7 +12,7 @@ DSRC=dirent.c DOBJ=opendir.o closedir.o readdir.o ifeq ($(LIB_CPU)-$(LIB_OS),i386-ELKS) -OBJ=$(LOBJ3) $(LOBJ) $(EOBJ) $(DOBJ) setjmp3.o +OBJ=$(LOBJ) $(EOBJ) $(DOBJ) setjmp3.o SYSCALLS=syscalls CFLAGS=$(ARCH) $(CCFLAGS) $(DEFS) diff --git a/libc/msdos/msdos.c b/libc/msdos/msdos.c index ae10b39..f9bfb9b 100644 --- a/libc/msdos/msdos.c +++ b/libc/msdos/msdos.c @@ -401,18 +401,23 @@ static int xlate_mode[] = { if( (cmode & 0222) == 0 ) creat_mode = 1; - /* BzzzT. Assume these flags both mean the merge of them */ - /* BzzzT. Also ignore O_EXCL */ - if( type & (O_TRUNC|O_CREAT) ) - rv = __dos_creat(nname, creat_mode); + /* BzzzT. Ignore O_EXCL */ + if( type & O_TRUNC ) /* Assume TRUNC always means CREAT too */ + rv = __dos_creat(nname, creat_mode); else { + int sv = errno; /* If we would open in compatibility mode make it a little more unixy */ if( type & O_DENYMODE ) rv = __dos_open(nname, type&(O_ACCMODE|O_DENYMODE|O_SETFD)); else rv = __dos_open(nname, xlate_mode[type&O_ACCMODE]); + + if (rv == -1 && errno == ENOENT && (type & O_CREAT)) { + errno = sv; + rv = __dos_creat(nname, creat_mode); + } } return rv; } diff --git a/libc/syscall/syscall.dev86.old b/libc/syscall/syscall.dev86.old deleted file mode 100644 index 29e7b5e..0000000 --- a/libc/syscall/syscall.dev86.old +++ /dev/null @@ -1,160 +0,0 @@ -# -# WARNING! -# This file is used to generate the system call lists for Dev86(elks) -# ELKSemu and elks itself. Changes to this may require changes in -# all three of those packages. -# -# . = Ok, with comment -# * = Needs libc code (Prefix __) -# - = Obsolete/not required -# @ = May be required later -# -# An initial plus on the call number specifies that this call is -# implemented in the kernel. -# -# Package versions are matched. -# Dev86/Elksemu version - 0.13.1 -# Elks version - 0.0.66 -# -# Name No Args Flag, comment -# -exit +1 1 * c exit does stdio, _exit in crt0 -fork +2 0 -read +3 3 -write +4 3 -open +5 3 -close +6 1 -wait4 +7 4 -creat 8 0 - Not needed alias for open -link +9 2 -unlink +10 1 -execve +11 3 * execve minix style -chdir +12 1 -time 13 1 - Use settimeofday -mknod +14 3 -chmod +15 2 -chown +16 3 -brk +17 1 * This is only to tell the system -stat +18 2 -lseek +19 3 * nb 2nd arg is an io ptr to long not a long. -getpid +20 1 * this gets both pid & ppid -mount +21 5 -umount +22 1 -setuid +23 1 -getuid +24 1 * this gets both uid and euid -stime 25 2 - this must not exist - even as a libc. -ptrace 26 4 @ adb/sdb/dbx need this. -alarm 27 2 -fstat +28 2 -pause 29 0 -utime 30 2 -chroot +31 1 -vfork 32 0 -access +33 2 -nice 34 1 -sleep 35 1 -sync +36 0 -kill 37 2 -rename +38 2 -mkdir +39 2 -rmdir +40 1 -dup +41 1 . There is a fcntl lib function too. -pipe 42 1 -times 43 2 * 2nd arg is pointer for long ret val. -profil 44 4 @ -dup2 +45 2 -setgid +46 1 -getgid 47 1 * this gets both gid and egid -signal 48 2 * have put the despatch table in user space. -getinfo 49 1 @ possible? gets pid,ppid,uid,euid etc -fcntl +50 3 -acct 51 1 @ Accounting to named file (off if null) -phys 52 3 - Replaced my mmap() -lock 53 1 @ Prevent swapping for this proc if flg!=0 -ioctl +54 3 . make this and fcntl the same ? -reboot +55 3 . the magic number is 0xfee1,0xdead,... -mpx 56 2 - Replaced by fifos and select. -lstat +57 2 -symlink +58 2 -readlink +59 3 -umask +60 1 -settimeofday 61 2 -gettimeofday 62 2 -select 63 5 * -readdir +64 3 * - -# -# Name No Args Flag&comment -# -# ( awk '{$2=NR+500;OFS="\t";print ;}'| expand -24,32,40 | unexpand ) <