diff options
author | Matt Wilson <msw@redhat.com> | 2000-03-24 16:59:00 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-03-24 16:59:00 +0000 |
commit | e16a0096b4db934c6c9bc18a9de1336c322d24b8 (patch) | |
tree | 294ed3315d2c159be1a9dd04242a0b03967dcda6 /loader/minilibc.h | |
parent | 0af1fe1127fce430e8a4f4a506195e9a7ee867a2 (diff) | |
download | anaconda-e16a0096b4db934c6c9bc18a9de1336c322d24b8.tar.gz anaconda-e16a0096b4db934c6c9bc18a9de1336c322d24b8.tar.xz anaconda-e16a0096b4db934c6c9bc18a9de1336c322d24b8.zip |
modified for i386 w/ 2.3 kernel
Diffstat (limited to 'loader/minilibc.h')
-rw-r--r-- | loader/minilibc.h | 45 |
1 files changed, 40 insertions, 5 deletions
diff --git a/loader/minilibc.h b/loader/minilibc.h index d9bf83a08..d80bf4e24 100644 --- a/loader/minilibc.h +++ b/loader/minilibc.h @@ -1,5 +1,7 @@ #include <stdarg.h> +#define _LOOSE_KERNEL_NAMES 1 + #define NULL ((void *) 0) #define WIFSTOPPED(status) (((status) & 0xff) == 0x7f) @@ -17,12 +19,12 @@ extern char ** _environ; extern int errno; -#include <linux/if.h> -#include <linux/un.h> #include <linux/socket.h> #include <linux/types.h> -#include <linux/net.h> #include <linux/time.h> +#include <linux/if.h> +#include <linux/un.h> +#include <linux/net.h> #include <asm/posix_types.h> #include <asm/termios.h> #include <asm/ioctls.h> @@ -79,7 +81,7 @@ static inline int fork(void) { static inline _syscall0(int,fork) #endif static inline _syscall0(pid_t,setsid) -static inline _syscall1(int,exit,int,exitcode) +extern inline _syscall1(int,exit,int,exitcode) 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); @@ -97,7 +99,7 @@ inline int listen(int a, int b); inline int accept(int a, void * addr, void * addr2); int strlen(const char * string); char * strcpy(char * dst, const char * src); -void * memcpy(void * dst, const void * src, int count); +void * memcpy(void * dst, const void * src, size_t count); void sleep(int secs); int strcmp(const char * a, const char * b); int strncmp(const char * a, const char * b, int len); @@ -106,4 +108,37 @@ void printf(char * fmt, ...); char * strchr(char * str, int ch); char * strncpy(char * dst, const char * src, int len); +#ifndef __FD_SET +#define __FD_SET(fd,fdsetp) \ + __asm__ __volatile__("btsl %1,%0": \ + "=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd))) +#endif + +#ifndef __FD_CLR +#define __FD_CLR(fd,fdsetp) \ + __asm__ __volatile__("btrl %1,%0": \ + "=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd))) +#endif + +#ifndef __FD_ISSET +#define __FD_ISSET(fd,fdsetp) (__extension__ ({ \ + unsigned char __result; \ + __asm__ __volatile__("btl %1,%2 ; setb %0" \ + :"=q" (__result) :"r" ((int) (fd)), \ + "m" (*(__kernel_fd_set *) (fdsetp))); \ + __result; })) +#endif + +#ifndef __FD_ZERO +#define __FD_ZERO(fdsetp) \ +do { \ + int __d0, __d1; \ + __asm__ __volatile__("cld ; rep ; stosl" \ + :"=m" (*(__kernel_fd_set *) (fdsetp)), \ + "=&c" (__d0), "=&D" (__d1) \ + :"a" (0), "1" (__FDSET_LONGS), \ + "2" ((__kernel_fd_set *) (fdsetp)) : "memory"); \ +} while (0) +#endif + void printstr(char * string); |