2002-04-23 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/machine/types.h (__pid_t, __off_t, __loff_t): Added. * libc/sys/linux/Makefile.am: Add support for mmap.c. * libc/sys/linux/Makefile.in: Regenerated. * libc/sys/linux/mmap.c: New file. * libc/sys/linux/machine/i386/syscall.h: Add _syscall6 macro. * libc/sys/linux/sys/types.h (pid_t, off_t, loff_t): Added.
This commit is contained in:
parent
54492ef5c6
commit
b9f9f69937
|
@ -1,9 +1,18 @@
|
|||
2002-04-23 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* libc/include/machine/types.h (__pid_t, __off_t, __loff_t): Added.
|
||||
* libc/sys/linux/Makefile.am: Add support for mmap.c.
|
||||
* libc/sys/linux/Makefile.in: Regenerated.
|
||||
* libc/sys/linux/mmap.c: New file.
|
||||
* libc/sys/linux/machine/i386/syscall.h: Add _syscall6 macro.
|
||||
* libc/sys/linux/sys/types.h (pid_t, off_t, loff_t): Added.
|
||||
|
||||
2002-04-22 Thomas Fitzsimmons <fitzsim@redhat.com>
|
||||
|
||||
* acinclude.m4 (newlib_cflags): Remove include directories that
|
||||
are already specified in the top-level configure.in's FLAGS_FOR_TARGET.
|
||||
|
||||
2002-04-19 Bill Siegmund
|
||||
2002-04-19 Bill Siegmund <ctc-dsl@pacbell.net>
|
||||
|
||||
* libc/machine/xscale/memchr.c: Don't use multi-line strings.
|
||||
* libc/machine/xscale/memcmp.c: Ditto.
|
||||
|
|
|
@ -6,6 +6,13 @@
|
|||
#define _CLOCKID_T_ unsigned long
|
||||
#define _TIMER_T_ unsigned long
|
||||
|
||||
typedef long int __off_t;
|
||||
typedef int __pid_t;
|
||||
#ifdef __GNUC__
|
||||
__extension__ typedef long long int __loff_t;
|
||||
#else
|
||||
typedef long int __loff_t;
|
||||
#endif
|
||||
|
||||
#endif /* _MACHTYPES_H_ */
|
||||
|
||||
|
|
|
@ -8,7 +8,8 @@ SUBDIRS = machine .
|
|||
SUBLIBS = $(LINUX_MACH_LIB)
|
||||
|
||||
LIB_SOURCES = \
|
||||
brk.c getoptlong.c ids.c inode.c io.c linux.c process.c realpath.c \
|
||||
brk.c getoptlong.c ids.c inode.c io.c linux.c mmap.c \
|
||||
process.c realpath.c \
|
||||
select.c signal.c siglongjmp.c socket.c sleep.c stack.c \
|
||||
sysconf.c systat.c termios.c time.c \
|
||||
usleep.c wait.c
|
||||
|
|
|
@ -93,7 +93,8 @@ SUBDIRS = machine .
|
|||
SUBLIBS = $(LINUX_MACH_LIB)
|
||||
|
||||
LIB_SOURCES = \
|
||||
brk.c getoptlong.c ids.c inode.c io.c linux.c process.c realpath.c \
|
||||
brk.c getoptlong.c ids.c inode.c io.c linux.c mmap.c \
|
||||
process.c realpath.c \
|
||||
select.c signal.c siglongjmp.c socket.c sleep.c stack.c \
|
||||
sysconf.c systat.c termios.c time.c \
|
||||
usleep.c wait.c
|
||||
|
@ -127,17 +128,17 @@ DEFS = @DEFS@ -I. -I$(srcdir)
|
|||
CPPFLAGS = @CPPFLAGS@
|
||||
LIBS = @LIBS@
|
||||
@USE_LIBTOOL_FALSE@lib_a_OBJECTS = brk.o getoptlong.o ids.o inode.o \
|
||||
@USE_LIBTOOL_FALSE@io.o linux.o process.o realpath.o select.o signal.o \
|
||||
@USE_LIBTOOL_FALSE@siglongjmp.o socket.o sleep.o stack.o sysconf.o \
|
||||
@USE_LIBTOOL_FALSE@systat.o termios.o time.o usleep.o wait.o
|
||||
@USE_LIBTOOL_FALSE@io.o linux.o mmap.o process.o realpath.o select.o \
|
||||
@USE_LIBTOOL_FALSE@signal.o siglongjmp.o socket.o sleep.o stack.o \
|
||||
@USE_LIBTOOL_FALSE@sysconf.o systat.o termios.o time.o usleep.o wait.o
|
||||
LTLIBRARIES = $(noinst_LTLIBRARIES)
|
||||
|
||||
@USE_LIBTOOL_TRUE@liblinux_la_DEPENDENCIES =
|
||||
@USE_LIBTOOL_TRUE@liblinux_la_OBJECTS = brk.lo getoptlong.lo ids.lo \
|
||||
@USE_LIBTOOL_TRUE@inode.lo io.lo linux.lo process.lo realpath.lo \
|
||||
@USE_LIBTOOL_TRUE@select.lo signal.lo siglongjmp.lo socket.lo sleep.lo \
|
||||
@USE_LIBTOOL_TRUE@stack.lo sysconf.lo systat.lo termios.lo time.lo \
|
||||
@USE_LIBTOOL_TRUE@usleep.lo wait.lo
|
||||
@USE_LIBTOOL_TRUE@inode.lo io.lo linux.lo mmap.lo process.lo \
|
||||
@USE_LIBTOOL_TRUE@realpath.lo select.lo signal.lo siglongjmp.lo \
|
||||
@USE_LIBTOOL_TRUE@socket.lo sleep.lo stack.lo sysconf.lo systat.lo \
|
||||
@USE_LIBTOOL_TRUE@termios.lo time.lo usleep.lo wait.lo
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
|
|
|
@ -55,6 +55,12 @@ __asm__ volatile ("push %%ebx; movl %2,%%ebx; int $0x80; pop %%ebx" \
|
|||
: "0" (__NR_##name),"m" ((long)(arg1)),"c" ((long)(arg2)), \
|
||||
"d" ((long)(arg3)),"S" ((long)(arg4)),"D" ((long)(arg5)));
|
||||
|
||||
#undef __inline_syscall6
|
||||
#define __inline_syscall6(name,ret,arg1,arg2,arg3,arg4,arg5,arg6) \
|
||||
__asm__ volatile ("push %%ebx; lea 8(%%ebp),%%ebx; int $0x80; pop %%ebx" \
|
||||
: "=a" (ret) \
|
||||
: "0" (__NR_##name));
|
||||
|
||||
#undef _syscall1
|
||||
#define _syscall1(type,name,type1,arg1) \
|
||||
type name(type1 arg1) \
|
||||
|
@ -102,6 +108,14 @@ __syscall_return(type,__res); \
|
|||
}
|
||||
|
||||
#undef _syscall6
|
||||
#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \
|
||||
type5,arg5,type6,arg6) \
|
||||
type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \
|
||||
{ \
|
||||
long __res; \
|
||||
__inline_syscall6(name,__res,arg1,arg2,arg3,arg4,arg5,arg6) \
|
||||
__syscall_return(type,__res); \
|
||||
}
|
||||
|
||||
#endif /* __PIC__ && __i386__ */
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
/* libc/sys/linux/mmap.c - Memory mapping functions */
|
||||
|
||||
/* Copyright 2002, Red Hat Inc. */
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <machine/syscall.h>
|
||||
|
||||
_syscall6(void *,mmap,void *,addr,size_t,len,int,prot,int,flags,int,fd,off_t,off);
|
||||
_syscall2(int,munmap,void *,addr,size_t,len);
|
||||
_syscall1(int,mlockall,int,flags);
|
||||
_syscall0(int,munlockall);
|
||||
_syscall2(int,mlock,const void *,addr,size_t,len);
|
||||
_syscall2(int,munlock,const void *,addr,size_t,len);
|
||||
_syscall3(int,mprotect,void *,addr,size_t,len,int,prot);
|
||||
_syscall3(int,msync,void *,addr,size_t,len,int,flags);
|
||||
_syscall4(void *,mremap,void *,addr,size_t,oldlen,size_t,newlen,int,maymove);
|
|
@ -25,7 +25,11 @@ typedef _CLOCK_T_ clock_t;
|
|||
#endif
|
||||
|
||||
typedef unsigned int __socklen_t;
|
||||
typedef long int __useconds_t;
|
||||
typedef unsigned int __useconds_t;
|
||||
|
||||
typedef __pid_t pid_t;
|
||||
typedef __off_t off_t;
|
||||
typedef __loff_t loff_t;
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
|
|
Loading…
Reference in New Issue