summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/include/sys
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2001-01-04 20:04:45 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2001-01-04 20:04:45 +0000
commit02fec4701cee79f875c1d02b8b4aee09380dbcb8 (patch)
treef4f291aedbb2e60ee58351481858a8cd3ec80b6b /mdk-stage1/dietlibc/include/sys
parent9887fe04751edf39e8389f2c3ec3f020b5e1c17d (diff)
downloaddrakx-backup-do-not-use-02fec4701cee79f875c1d02b8b4aee09380dbcb8.tar
drakx-backup-do-not-use-02fec4701cee79f875c1d02b8b4aee09380dbcb8.tar.gz
drakx-backup-do-not-use-02fec4701cee79f875c1d02b8b4aee09380dbcb8.tar.bz2
drakx-backup-do-not-use-02fec4701cee79f875c1d02b8b4aee09380dbcb8.tar.xz
drakx-backup-do-not-use-02fec4701cee79f875c1d02b8b4aee09380dbcb8.zip
integrate dietlibc/stdio per default for cdrom and disk only installs
Diffstat (limited to 'mdk-stage1/dietlibc/include/sys')
-rw-r--r--mdk-stage1/dietlibc/include/sys/cdefs.h24
-rw-r--r--mdk-stage1/dietlibc/include/sys/ioctl.h10
-rw-r--r--mdk-stage1/dietlibc/include/sys/mman.h25
-rw-r--r--mdk-stage1/dietlibc/include/sys/mount.h81
-rw-r--r--mdk-stage1/dietlibc/include/sys/resource.h7
-rw-r--r--mdk-stage1/dietlibc/include/sys/select.h0
-rw-r--r--mdk-stage1/dietlibc/include/sys/socket.h20
-rw-r--r--mdk-stage1/dietlibc/include/sys/stat.h48
-rw-r--r--mdk-stage1/dietlibc/include/sys/time.h24
-rw-r--r--mdk-stage1/dietlibc/include/sys/types.h33
-rw-r--r--mdk-stage1/dietlibc/include/sys/utsname.h35
-rw-r--r--mdk-stage1/dietlibc/include/sys/vfs.h11
-rw-r--r--mdk-stage1/dietlibc/include/sys/wait.h14
13 files changed, 332 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/include/sys/cdefs.h b/mdk-stage1/dietlibc/include/sys/cdefs.h
new file mode 100644
index 000000000..9f256f59f
--- /dev/null
+++ b/mdk-stage1/dietlibc/include/sys/cdefs.h
@@ -0,0 +1,24 @@
+#ifndef _SYS_CDEFS_H
+#define _SYS_CDEFS_H
+
+#ifndef __cplusplus
+#define throw ()
+#define __THROW
+#else
+#define __THROW throw ()
+#endif
+
+#ifndef __GNUC__
+#define __attribute__(xyz)
+#endif
+
+#define __pure__
+#ifdef __GNUC__
+#if (__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 96))
+#undef __pure__
+#define __pure__ __attribute__ ((__pure__))
+#endif
+
+#endif
+
+#endif
diff --git a/mdk-stage1/dietlibc/include/sys/ioctl.h b/mdk-stage1/dietlibc/include/sys/ioctl.h
new file mode 100644
index 000000000..fca1aeeab
--- /dev/null
+++ b/mdk-stage1/dietlibc/include/sys/ioctl.h
@@ -0,0 +1,10 @@
+#ifndef _IOCTL_H
+#define _IOCTL_H
+
+#include <sys/cdefs.h>
+#include <linux/ioctl.h>
+#include <asm/ioctls.h>
+
+int ioctl(int d, int request, ...) __THROW;
+
+#endif
diff --git a/mdk-stage1/dietlibc/include/sys/mman.h b/mdk-stage1/dietlibc/include/sys/mman.h
new file mode 100644
index 000000000..03faa37ae
--- /dev/null
+++ b/mdk-stage1/dietlibc/include/sys/mman.h
@@ -0,0 +1,25 @@
+#ifndef _SYS_MMAN_H
+#define _SYS_MMAN_H
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <linux/mman.h>
+
+#define MAP_FAILED ((void *) -1)
+
+extern void *mmap (void *__addr, size_t __len, int __prot,
+ int __flags, int __fd, off_t __offset);
+
+extern int munmap (void *__addr, size_t __len) __THROW;
+extern int mprotect (void *__addr, size_t __len, int __prot) __THROW;
+extern int msync (void *__addr, size_t __len, int __flags) __THROW;
+extern void *mremap (void *__addr, size_t __old_len, size_t __new_len,
+ int __may_move) __THROW;
+extern int mincore (void *__start, size_t __len, unsigned char *__vec);
+
+#ifdef __quad_t
+extern void *mmap64 (void *__addr, size_t __len, int __prot,
+ int __flags, int __fd, off64_t __offset) __THROW;
+#endif
+
+#endif
diff --git a/mdk-stage1/dietlibc/include/sys/mount.h b/mdk-stage1/dietlibc/include/sys/mount.h
new file mode 100644
index 000000000..1c4368a2f
--- /dev/null
+++ b/mdk-stage1/dietlibc/include/sys/mount.h
@@ -0,0 +1,81 @@
+#ifndef _SYS_MOUNT_H
+#define _SYS_MOUNT_H 1
+
+#include <sys/ioctl.h>
+
+#define BLOCK_SIZE 1024
+#define BLOCK_SIZE_BITS 10
+
+/* These are the fs-independent mount-flags: up to 16 flags are
+ supported */
+enum
+{
+ MS_RDONLY = 1, /* Mount read-only. */
+#define MS_RDONLY MS_RDONLY
+ MS_NOSUID = 2, /* Ignore suid and sgid bits. */
+#define MS_NOSUID MS_NOSUID
+ MS_NODEV = 4, /* Disallow access to device special files. */
+#define MS_NODEV MS_NODEV
+ MS_NOEXEC = 8, /* Disallow program execution. */
+#define MS_NOEXEC MS_NOEXEC
+ MS_SYNCHRONOUS = 16, /* Writes are synced at once. */
+#define MS_SYNCHRONOUS MS_SYNCHRONOUS
+ MS_REMOUNT = 32, /* Alter flags of a mounted FS. */
+#define MS_REMOUNT MS_REMOUNT
+ MS_MANDLOCK = 64, /* Allow mandatory locks on an FS. */
+#define MS_MANDLOCK MS_MANDLOCK
+ S_WRITE = 128, /* Write on file/directory/symlink. */
+#define S_WRITE S_WRITE
+ S_APPEND = 256, /* Append-only file. */
+#define S_APPEND S_APPEND
+ S_IMMUTABLE = 512, /* Immutable file. */
+#define S_IMMUTABLE S_IMMUTABLE
+ MS_NOATIME = 1024, /* Do not update access times. */
+#define MS_NOATIME MS_NOATIME
+ MS_NODIRATIME = 2048, /* Do not update directory access times. */
+#define MS_NODIRATIME MS_NODIRATIME
+ MS_BIND = 4096, /* Bind directory at different place. */
+#define MS_BIND MS_BIND
+};
+
+/* Flags that can be altered by MS_REMOUNT */
+#define MS_RMT_MASK (MS_RDONLY | MS_MANDLOCK)
+
+
+/* Magic mount flag number. Has to be or-ed to the flag values. */
+
+#define MS_MGC_VAL 0xc0ed0000 /* Magic flag number to indicate "new" flags */
+#define MS_MGC_MSK 0xffff0000 /* Magic flag number mask */
+
+
+/* The read-only stuff doesn't really belong here, but any other place
+ is probably as bad and I don't want to create yet another include
+ file. */
+
+#define BLKROSET _IO(0x12, 93) /* Set device read-only (0 = read-write). */
+#define BLKROGET _IO(0x12, 94) /* Get read-only status (0 = read_write). */
+#define BLKRRPART _IO(0x12, 95) /* Re-read partition table. */
+#define BLKGETSIZE _IO(0x12, 96) /* Return device size. */
+#define BLKFLSBUF _IO(0x12, 97) /* Flush buffer cache. */
+#define BLKRASET _IO(0x12, 98) /* Set read ahead for block device. */
+#define BLKRAGET _IO(0x12, 99) /* Get current read ahead setting. */
+
+
+/* Possible value for FLAGS parameter of `umount2'. */
+enum
+{
+ MNT_FORCE = 1 /* Force unmounting. */
+#define MNT_FORCE MNT_FORCE
+};
+
+
+/* Mount a filesystem. */
+int mount(const char *specialfile, const char *dir, const char *filesystemtype, unsigned long rwflag, const void *data) __THROW;
+
+/* Unmount a filesystem. */
+extern int umount (const char *__special_file) __THROW;
+
+/* Unmount a filesystem. Force unmounting if FLAGS is set to MNT_FORCE. */
+extern int umount2 (const char *__special_file, int __flags) __THROW;
+
+#endif /* _SYS_MOUNT_H */
diff --git a/mdk-stage1/dietlibc/include/sys/resource.h b/mdk-stage1/dietlibc/include/sys/resource.h
new file mode 100644
index 000000000..953fc0eb2
--- /dev/null
+++ b/mdk-stage1/dietlibc/include/sys/resource.h
@@ -0,0 +1,7 @@
+#ifndef _SYS_RESOURCE_H
+#define _SYS_RESOURCE_H
+
+#include <sys/cdefs.h>
+#include <linux/resource.h>
+
+#endif
diff --git a/mdk-stage1/dietlibc/include/sys/select.h b/mdk-stage1/dietlibc/include/sys/select.h
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/mdk-stage1/dietlibc/include/sys/select.h
diff --git a/mdk-stage1/dietlibc/include/sys/socket.h b/mdk-stage1/dietlibc/include/sys/socket.h
new file mode 100644
index 000000000..659c88e99
--- /dev/null
+++ b/mdk-stage1/dietlibc/include/sys/socket.h
@@ -0,0 +1,20 @@
+#ifndef _SYS_SOCKET_H
+#define _SYS_SOCKET_H
+
+#include <sys/types.h>
+#include <linux/socket.h>
+
+int socket(int domain, int type, int protocol);
+int accept(int s, struct sockaddr *addr, socklen_t *addrlen);
+int connect(int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen);
+int bind(int sockfd, struct sockaddr *my_addr, socklen_t addrlen);
+int recv(int s, void *buf, size_t len, int flags);
+int recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);
+int recvmsg(int s, struct msghdr *msg, int flags);
+int send(int s, const void *msg, size_t len, int flags);
+int sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen);
+int sendmsg(int s, const struct msghdr *msg, int flags);
+int getpeername(int s, struct sockaddr *name, socklen_t *namelen);
+int getsockname(int s , struct sockaddr * name , socklen_t * namelen );
+
+#endif
diff --git a/mdk-stage1/dietlibc/include/sys/stat.h b/mdk-stage1/dietlibc/include/sys/stat.h
new file mode 100644
index 000000000..7c3504218
--- /dev/null
+++ b/mdk-stage1/dietlibc/include/sys/stat.h
@@ -0,0 +1,48 @@
+#ifndef _SYS_STAT_H
+#define _SYS_STAT_H
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+
+#include <linux/stat.h>
+#include <asm/stat.h>
+
+#ifdef __alpha__
+#define __NO_STAT64
+#endif
+
+#define stat(file,buf) __dietstat(file,buf)
+#define fstat(file,buf) __dietfstat(file,buf)
+#define lstat(file,buf) __dietlstat(file,buf)
+
+#define stat64(file,buf) __dietstat64(file,buf)
+#define fstat64(file,buf) __dietfstat64(file,buf)
+#define lstat64(file,buf) __dietlstat64(file,buf)
+
+#define major(dev) (((dev)>>8) & 0xff)
+#define minor(dev) ((dev) & 0xff)
+#define makedev(major, minor) ((((unsigned int) (major)) << 8) | ((unsigned int) (minor)))
+
+extern int __dietstat (const char *__file, struct stat *__buf) __THROW;
+extern int __dietfstat (int __fd, struct stat *__buf) __THROW;
+extern int __dietlstat (const char *__file, struct stat *__buf) __THROW;
+
+#ifndef __NO_STAT64
+extern int __dietstat64 (const char *__file, struct stat64 *__buf) __THROW;
+extern int __dietfstat64 (int __fd, struct stat64 *__buf) __THROW;
+extern int __dietlstat64 (const char *__file, struct stat64 *__buf) __THROW;
+#endif
+
+extern int chmod (const char *__file, mode_t __mode) __THROW;
+
+extern int fchmod (int __fd, mode_t __mode) __THROW;
+
+extern mode_t umask (mode_t __mask) __THROW;
+
+extern int mkdir (const char *__path, mode_t __mode) __THROW;
+
+extern int mknod (const char *__path, mode_t __mode, dev_t __dev) __THROW;
+
+extern int mkfifo (const char *__path, mode_t __mode) __THROW;
+
+#endif
diff --git a/mdk-stage1/dietlibc/include/sys/time.h b/mdk-stage1/dietlibc/include/sys/time.h
new file mode 100644
index 000000000..069d50a83
--- /dev/null
+++ b/mdk-stage1/dietlibc/include/sys/time.h
@@ -0,0 +1,24 @@
+#ifndef _SYS_TIME_H
+#define _SYS_TIME_H 1
+
+#include <sys/cdefs.h>
+
+#include <sys/types.h>
+#include <linux/time.h>
+
+#if defined __USE_GNU || defined __USE_BSD
+typedef struct timezone *__timezone_ptr_t;
+#else
+typedef void *__timezone_ptr_t;
+#endif
+
+int getitimer(int which, struct itimerval *value) __THROW;
+int setitimer(int which, const struct itimerval *value, struct itimerval *ovalue) __THROW;
+
+int gettimeofday(struct timeval *tv, struct timezone *tz) __THROW;
+int settimeofday(const struct timeval *tv , const struct timezone *tz) __THROW;
+
+extern int adjtime (const struct timeval *__delta,
+ struct timeval *__olddelta) __THROW;
+
+#endif
diff --git a/mdk-stage1/dietlibc/include/sys/types.h b/mdk-stage1/dietlibc/include/sys/types.h
new file mode 100644
index 000000000..34dbaa9f1
--- /dev/null
+++ b/mdk-stage1/dietlibc/include/sys/types.h
@@ -0,0 +1,33 @@
+#ifndef _SYS_TYPES_H
+#define _SYS_TYPES_H
+
+#include <linux/types.h>
+#include <linux/posix_types.h>
+#include <linux/socket.h>
+
+#ifdef __GNUC__
+#define __quad_t __quad_t
+typedef long long int __quad_t;
+typedef unsigned long long int __u_quad_t;
+#else
+#warning no long long support - no 64 bit file I/O support
+typedef long int __quad_t;
+typedef unsigned long int __u_quad_t;
+#endif
+
+
+#ifdef __quad_t
+typedef __quad_t off64_t;
+typedef __u_quad_t ino64_t;
+typedef __quad_t blkcnt64_t;
+#endif
+
+typedef long int fpos_t;
+
+#define socklen_t socklen_t
+typedef unsigned int socklen_t;
+
+typedef long int blksize_t;
+typedef long int blkcnt_t;
+
+#endif
diff --git a/mdk-stage1/dietlibc/include/sys/utsname.h b/mdk-stage1/dietlibc/include/sys/utsname.h
new file mode 100644
index 000000000..37bf6c811
--- /dev/null
+++ b/mdk-stage1/dietlibc/include/sys/utsname.h
@@ -0,0 +1,35 @@
+#ifndef _SYS_UTSNAME_H
+#define _SYS_UTSNAME_H 1
+
+#include <sys/cdefs.h>
+
+/* Length of the entries in `struct utsname' is 65. */
+#define _UTSNAME_LENGTH 65
+#define _UTSNAME_NODENAME_LENGTH _UTSNAME_LENGTH
+
+/* Linux provides as additional information in the `struct utsname'
+ the name of the current domain. Define _UTSNAME_DOMAIN_LENGTH
+ to a value != 0 to activate this entry. */
+#define _UTSNAME_DOMAIN_LENGTH _UTSNAME_LENGTH
+
+struct utsname {
+ /* Name of the implementation of the operating system. */
+ char sysname[_UTSNAME_LENGTH];
+
+ /* Name of this node on the network. */
+ char nodename[_UTSNAME_NODENAME_LENGTH];
+
+ /* Current release level of this implementation. */
+ char release[_UTSNAME_LENGTH];
+ /* Current version level of this release. */
+ char version[_UTSNAME_LENGTH];
+
+ /* Name of the hardware type the system is running on. */
+ char machine[_UTSNAME_LENGTH];
+
+ /* Name of the domain of this node on the network. */
+ char domainname[_UTSNAME_DOMAIN_LENGTH];
+};
+
+extern int uname (struct utsname *__name) __THROW;
+#endif
diff --git a/mdk-stage1/dietlibc/include/sys/vfs.h b/mdk-stage1/dietlibc/include/sys/vfs.h
new file mode 100644
index 000000000..e4740a225
--- /dev/null
+++ b/mdk-stage1/dietlibc/include/sys/vfs.h
@@ -0,0 +1,11 @@
+#ifndef _SYS_VFS_H
+#define _SYS_VFS_H
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <linux/vfs.h>
+
+int statfs(const char *path, struct statfs *buf) __THROW;
+int fstatfs(int fd, struct statfs *buf) __THROW;
+
+#endif
diff --git a/mdk-stage1/dietlibc/include/sys/wait.h b/mdk-stage1/dietlibc/include/sys/wait.h
new file mode 100644
index 000000000..91b5da348
--- /dev/null
+++ b/mdk-stage1/dietlibc/include/sys/wait.h
@@ -0,0 +1,14 @@
+#ifndef _SYS_WAIT_H
+#define _SYS_WAIT_H
+
+#include <sys/cdefs.h>
+#include <sys/resource.h>
+
+pid_t wait(int *status) __THROW;
+pid_t waitpid(pid_t pid, int *status, int options) __THROW;
+
+pid_t wait3(int *status, int options, struct rusage *rusage) __THROW;
+
+pid_t wait4(pid_t pid, int *status, int options, struct rusage *rusage) __THROW;
+
+#endif