diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2003-11-07 23:47:05 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2003-11-07 23:47:05 +0000 |
commit | fe359733a40391e86514cb26cbe7a79416313881 (patch) | |
tree | 021953775edbc4d818fccce2955b8586cf7da8be /newlib/libc/sys | |
parent | 0a5ea9471bff6e0fb314b0a6361c6f57224f0505 (diff) | |
download | cygnal-fe359733a40391e86514cb26cbe7a79416313881.tar.gz cygnal-fe359733a40391e86514cb26cbe7a79416313881.tar.bz2 cygnal-fe359733a40391e86514cb26cbe7a79416313881.zip |
2003-11-07 Jeff Johnston <jjohnstn@redhat.com>
* configure.host: Remove -DLOOSE_KERNEL_NAMES flag for linux
x86 build.
* iconvdata/Makefile.am: Make dependent on newlib's configure.host
and set up default flags to pass to aclocal.
* iconvdata/Makefile.in: Regenerated.
* libc/sys/linux/Makefile.am: Add _ELIX_LEVEL_4 getlogin, getpwnam,
and getpwuid routines.
* libc/sys/linux/Makefile.in: Regenerated.
* libc/sys/linux/getlogin.c: New stub file to allow x86-linux
applications to link with newlib's shared libc library.
* libc/sys/linux/getpwnam.c: Ditto.
* libc/sys/linux/getpwuid.c: Ditto.
* libc/sys/linux/sys/types.h: Include <features.h> and supply types
that were formerly supplied by /usr/include/linux/types.h with
kernel types.
* testsuite/newlib.wctype/twctype.c: Fix testcase to properly
test _ELIX_LEVEL macro.
Diffstat (limited to 'newlib/libc/sys')
-rw-r--r-- | newlib/libc/sys/linux/Makefile.am | 3 | ||||
-rw-r--r-- | newlib/libc/sys/linux/Makefile.in | 9 | ||||
-rw-r--r-- | newlib/libc/sys/linux/getlogin.c | 11 | ||||
-rw-r--r-- | newlib/libc/sys/linux/getpwnam.c | 12 | ||||
-rw-r--r-- | newlib/libc/sys/linux/getpwuid.c | 12 | ||||
-rw-r--r-- | newlib/libc/sys/linux/sys/types.h | 51 |
6 files changed, 94 insertions, 4 deletions
diff --git a/newlib/libc/sys/linux/Makefile.am b/newlib/libc/sys/linux/Makefile.am index 935f60d03..1579368c3 100644 --- a/newlib/libc/sys/linux/Makefile.am +++ b/newlib/libc/sys/linux/Makefile.am @@ -145,6 +145,9 @@ ELIX_3_OBJS = \ wait.$(oext) ELIX_4_OBJS = \ + getlogin.$(oext) \ + getpwnam.$(oext) \ + getpwuid.$(oext) \ stack.$(oext) if ELIX_LEVEL_1 diff --git a/newlib/libc/sys/linux/Makefile.in b/newlib/libc/sys/linux/Makefile.in index a9065799d..809ecbcc4 100644 --- a/newlib/libc/sys/linux/Makefile.in +++ b/newlib/libc/sys/linux/Makefile.in @@ -1,6 +1,6 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am +# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -242,6 +242,9 @@ ELIX_3_OBJS = \ ELIX_4_OBJS = \ + getlogin.$(oext) \ + getpwnam.$(oext) \ + getpwuid.$(oext) \ stack.$(oext) @ELIX_LEVEL_1_TRUE@LIB_OBJS = @@ -480,7 +483,7 @@ maintainer-clean-recursive: dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ - test "$$subdir" = "." && dot_seen=yes; \ + test "$$subdir" != "." || dot_seen=yes; \ done; \ test "$$dot_seen" = "no" && rev=". $$rev"; \ target=`echo $@ | sed s/-recursive//`; \ diff --git a/newlib/libc/sys/linux/getlogin.c b/newlib/libc/sys/linux/getlogin.c new file mode 100644 index 000000000..3931e7731 --- /dev/null +++ b/newlib/libc/sys/linux/getlogin.c @@ -0,0 +1,11 @@ +/* FIXME: dummy stub for now. */ +#include <errno.h> +#include <unistd.h> + +char * +_DEFUN_VOID (getlogin) +{ + errno = ENOSYS; + return NULL; +} + diff --git a/newlib/libc/sys/linux/getpwnam.c b/newlib/libc/sys/linux/getpwnam.c new file mode 100644 index 000000000..c90562c5a --- /dev/null +++ b/newlib/libc/sys/linux/getpwnam.c @@ -0,0 +1,12 @@ +/* FIXME: dummy stub for now. */ +#include <errno.h> +#include <pwd.h> + +struct passwd * +_DEFUN (getpwnam, (name), + _CONST char *name) +{ + errno = ENOSYS; + return NULL; +} + diff --git a/newlib/libc/sys/linux/getpwuid.c b/newlib/libc/sys/linux/getpwuid.c new file mode 100644 index 000000000..4e9fcb220 --- /dev/null +++ b/newlib/libc/sys/linux/getpwuid.c @@ -0,0 +1,12 @@ +/* FIXME: dummy stub for now. */ +#include <errno.h> +#include <pwd.h> + +struct passwd * +_DEFUN (getpwuid, (uid), + uid_t uid) +{ + errno = ENOSYS; + return NULL; +} + diff --git a/newlib/libc/sys/linux/sys/types.h b/newlib/libc/sys/linux/sys/types.h index 90011ea83..ddd028424 100644 --- a/newlib/libc/sys/linux/sys/types.h +++ b/newlib/libc/sys/linux/sys/types.h @@ -50,6 +50,7 @@ * libc/include/sys/types.h. Repeat those here and * skip the kernel's definitions. */ +#include <features.h> #include <sys/config.h> #include <machine/types.h> #include <sys/_types.h> @@ -112,7 +113,9 @@ typedef long fd_mask; # define howmany(x,y) (((x)+((y)-1))/(y)) # endif -#define fd_set _types_fd_set +typedef struct { + unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))]; +} __fd_set; # define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS))) # define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS))) @@ -135,11 +138,57 @@ typedef long fd_mask; #define __off_t_defined #define __off64_t_defined +typedef __ino_t ino_t; typedef __ino64_t ino64_t; typedef __uint32_t uintptr_t; typedef __int32_t intptr_t; typedef __off64_t off64_t; typedef __off_t off_t; +typedef __loff_t loff_t; +typedef __mode_t mode_t; +typedef __pid_t pid_t; +typedef __uid_t uid_t; +typedef __gid_t gid_t; +typedef __key_t key_t; +typedef __suseconds_t suseconds_t; +typedef __useconds_t useconds_t; +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; +typedef __dev_t dev_t; +typedef __fd_set fd_set; +typedef __nlink_t nlink_t; + +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __uint8_t u_int8_t; +typedef __uint16_t u_int16_t; +typedef __uint32_t u_int32_t; +typedef __uint64_t u_int64_t; +typedef __int16_t int16_t; +typedef __int32_t int32_t; +typedef __int64_t int64_t; + +#ifndef _UINT8_T_DECLARED +typedef __uint8_t uint8_t; +#define _UINT8_T_DECLARED +#endif + +#ifndef _UINT16_T_DECLARED +typedef __uint16_t uint16_t; +#define _UINT16_T_DECLARED +#endif + +#ifndef _UINT32_T_DECLARED +typedef __uint32_t uint32_t; +#define _UINT32_T_DECLARED +#endif + +#ifndef _UINT64_T_DECLARED +typedef __uint64_t uint64_t; +#define _UINT64_T_DECLARED +#endif #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) typedef struct _physadr { |