diff options
author | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2002-10-09 13:22:51 +0000 |
---|---|---|
committer | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2002-10-09 13:22:51 +0000 |
commit | 67b2399796a1fd5e2b7301a7a2c844ed76cb7252 (patch) | |
tree | 380081afcf3b4b3f6139d351bb57a243b7e6ea8b /mdk-stage1/minilibc.h | |
parent | 96c3c3669c218e7693c79b0112140d431c3e74de (diff) | |
download | drakx-67b2399796a1fd5e2b7301a7a2c844ed76cb7252.tar drakx-67b2399796a1fd5e2b7301a7a2c844ed76cb7252.tar.gz drakx-67b2399796a1fd5e2b7301a7a2c844ed76cb7252.tar.bz2 drakx-67b2399796a1fd5e2b7301a7a2c844ed76cb7252.tar.xz drakx-67b2399796a1fd5e2b7301a7a2c844ed76cb7252.zip |
Add support for x86-64 to minilibc. But we don't really use it yet, as glibc
requirements for stage1 undoubtedly make images already bigger. So let have
glibc init there too. ;-)
Diffstat (limited to 'mdk-stage1/minilibc.h')
-rw-r--r-- | mdk-stage1/minilibc.h | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/mdk-stage1/minilibc.h b/mdk-stage1/minilibc.h index e0775e3a0..cbcb21f44 100644 --- a/mdk-stage1/minilibc.h +++ b/mdk-stage1/minilibc.h @@ -58,6 +58,9 @@ extern int errno; #include <asm/fcntl.h> #include <asm/signal.h> +#ifndef __NR__newselect +#define __NR__newselect __NR_select +#endif #ifndef MINILIBC_INTERNAL static inline _syscall5(int,mount,const char *,spec,const char *,dir,const char *,type,unsigned long,rwflag,const void *,data); @@ -76,8 +79,17 @@ static inline _syscall2(int,chmod,const char * ,path,mode_t,mode) static inline _syscall2(int,sethostname,const char *,name,int,len) static inline _syscall2(int,setdomainname,const char *,name,int,len) static inline _syscall2(int,setpgid,int,name,int,len) +#ifdef __x86_64__ +extern __sighandler_t signal(int signum, __sighandler_t handler); +#else static inline _syscall2(int,signal,int,num,void *,len) +#endif +#ifdef __NR_umount static inline _syscall1(int,umount,const char *,dir) +#else +static inline _syscall2(int,umount2,const char *,dir,int,flags) +static inline int umount(const char * dir) { return umount2(dir, 0); } +#endif static inline _syscall1(int,unlink,const char *,fn) static inline _syscall1(int,close,int,fd) static inline _syscall1(int,swapoff,const char *,fn) @@ -112,19 +124,21 @@ static inline _syscall3(int,syslog,int, type, char *, buf, int, len); #else static inline _syscall5(int,_newselect,int,n,fd_set *,rd,fd_set *,wr,fd_set *,ex,struct timeval *,timeval); static inline _syscall3(int,write,int,fd,const char *,buf,unsigned long,count) +#ifdef __NR_socketcall static inline _syscall2(int,socketcall,int,code,unsigned long *, args) +#endif #define __NR__do_exit __NR_exit -extern inline _syscall1(int,_do_exit,int,exitcode) +static inline _syscall1(int,_do_exit,int,exitcode) #endif #define select _newselect extern int errno; -inline int socket(int a, int b, int c); -inline int bind(int a, void * b, int c); -inline int listen(int a, int b); -inline int accept(int a, void * addr, void * addr2); +int socket(int a, int b, int c); +int bind(int a, void * b, int c); +int listen(int a, int b); +int accept(int a, void * addr, void * addr2); void sleep(int secs); |