diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2001-05-14 14:19:32 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2001-05-14 14:19:32 +0000 |
commit | 167217bec15c9c7aa70ba2a3dc9c689b3cd91872 (patch) | |
tree | 7c0c62debf8f9f145643102fb52b81afce743594 /mdk-stage1/dietlibc/sparc/shmat.c | |
parent | 9097327dc1c667fc51b8e05cc7c0626fac96665d (diff) | |
download | drakx-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.tar drakx-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.tar.gz drakx-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.tar.bz2 drakx-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.tar.xz drakx-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.zip |
import new version of dietlibc
Diffstat (limited to 'mdk-stage1/dietlibc/sparc/shmat.c')
-rw-r--r-- | mdk-stage1/dietlibc/sparc/shmat.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/sparc/shmat.c b/mdk-stage1/dietlibc/sparc/shmat.c new file mode 100644 index 000000000..73b2d89a9 --- /dev/null +++ b/mdk-stage1/dietlibc/sparc/shmat.c @@ -0,0 +1,19 @@ +#include <sys/types.h> +#include <sys/ipc.h> +#include <sys/shm.h> +#include <asm/ipc.h> + +extern void* __ipc(); + +#ifndef PAGE_SIZE +#define PAGE_SIZE 4096 +#endif + +void* shmat(int shmid,const void* shmaddr,int shmflg) { + void* raddr; + register void* result; + result=__ipc(SHMAT,shmid,shmflg,&raddr,shmaddr); + if ((unsigned long)result <= -(unsigned long)PAGE_SIZE) + result=raddr; + return result; +} |