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.
This commit is contained in:
Jeff Johnston
2003-11-07 23:47:05 +00:00
parent 0a5ea9471b
commit fe359733a4
11 changed files with 128 additions and 12 deletions

View File

@ -145,6 +145,9 @@ ELIX_3_OBJS = \
wait.$(oext)
ELIX_4_OBJS = \
getlogin.$(oext) \
getpwnam.$(oext) \
getpwuid.$(oext) \
stack.$(oext)
if ELIX_LEVEL_1

View File

@ -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//`; \

View File

@ -0,0 +1,11 @@
/* FIXME: dummy stub for now. */
#include <errno.h>
#include <unistd.h>
char *
_DEFUN_VOID (getlogin)
{
errno = ENOSYS;
return NULL;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 {