aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--newlib/ChangeLog20
-rw-r--r--newlib/configure.host2
-rw-r--r--newlib/iconvdata/Makefile.am2
-rw-r--r--newlib/iconvdata/Makefile.in12
-rw-r--r--newlib/libc/sys/linux/Makefile.am3
-rw-r--r--newlib/libc/sys/linux/Makefile.in9
-rw-r--r--newlib/libc/sys/linux/getlogin.c11
-rw-r--r--newlib/libc/sys/linux/getpwnam.c12
-rw-r--r--newlib/libc/sys/linux/getpwuid.c12
-rw-r--r--newlib/libc/sys/linux/sys/types.h51
-rw-r--r--newlib/testsuite/newlib.wctype/twctype.c6
11 files changed, 128 insertions, 12 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index ac23875..302a864 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,5 +1,25 @@
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.
+
+2003-11-07 Jeff Johnston <jjohnstn@redhat.com>
+
* libc/stdio/vfprintf.c (_VFPRINTF_R): Fix typos that should be
referring to _NO_LONGLONG macro.
diff --git a/newlib/configure.host b/newlib/configure.host
index 2fbb64c..521c8fb 100644
--- a/newlib/configure.host
+++ b/newlib/configure.host
@@ -347,7 +347,7 @@ case "${host}" in
#newlib_cflags="${newlib_cflags} -Werror" # DEBUGGING ONLY;BREAKS BUILD
newlib_cflags="${newlib_cflags} -Wall"
newlib_cflags="${newlib_cflags} -D_I386MACH_ALLOW_HW_INTERRUPTS"
- newlib_cflags="${newlib_cflags} -D_LOOSE_KERNEL_NAMES -DHAVE_FCNTL"
+ newlib_cflags="${newlib_cflags} -DHAVE_FCNTL"
newlib_cflags="${newlib_cflags} -DWANT_IO_POS_ARGS -DWANT_IO_LONG_DBL"
# --- Required when building a shared library ------------------------
newlib_cflags="${newlib_cflags} -fPIC -D_I386MACH_NEED_SOTYPE_FUNCTION"
diff --git a/newlib/iconvdata/Makefile.am b/newlib/iconvdata/Makefile.am
index a18477b..33138d2 100644
--- a/newlib/iconvdata/Makefile.am
+++ b/newlib/iconvdata/Makefile.am
@@ -23,3 +23,5 @@ EUC_JP_la_LDFLAGS = -module -no-undefined -Xcompiler -Wl,-rpath-link=.. -Xcompil
install-data-local: install-pkglibLTLIBRARIES $(srcdir)/gconv-modules
$(INSTALL_DATA) $(srcdir)/gconv-modules $(DESTDIR)$(pkglibdir)/gconv-modules
+ACLOCAL_AMFLAGS = -I ..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/iconvdata/Makefile.in b/newlib/iconvdata/Makefile.in
index e9e3c27..954ad02 100644
--- a/newlib/iconvdata/Makefile.in
+++ b/newlib/iconvdata/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.
@@ -105,6 +105,9 @@ EUC_JP_la_SOURCES = dummy.c
EUC_JP_la_LIBADD = $(LIB_OBJS)
EUC_JP_la_DEPENDENCIES = $(LIB_OBJS)
EUC_JP_la_LDFLAGS = -module -no-undefined -Xcompiler -Wl,-rpath-link=.. -Xcompiler -nostdlib -L.. -lc
+
+ACLOCAL_AMFLAGS = -I ..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
CONFIG_CLEAN_FILES =
@@ -140,8 +143,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in
- cd $(srcdir) && $(ACLOCAL)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in ../acinclude.m4 \
+ ../aclocal.m4 ../libtool.m4
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
diff --git a/newlib/libc/sys/linux/Makefile.am b/newlib/libc/sys/linux/Makefile.am
index 935f60d..1579368 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 a906579..809ecbc 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 0000000..3931e77
--- /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 0000000..c90562c
--- /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 0000000..4e9fcb2
--- /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 90011ea..ddd0284 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 {
diff --git a/newlib/testsuite/newlib.wctype/twctype.c b/newlib/testsuite/newlib.wctype/twctype.c
index 7adf508..d206876 100644
--- a/newlib/testsuite/newlib.wctype/twctype.c
+++ b/newlib/testsuite/newlib.wctype/twctype.c
@@ -8,9 +8,8 @@
int main()
{
- if (_ELIX_LEVEL == 1)
- { /* no testing..wctype functions aren't present */ }
- else if (_MB_LEN_MAX == 1)
+#if !defined(_ELIX_LEVEL) || _ELIX_LEVEL > 1
+ if (_MB_LEN_MAX == 1)
{
CHECK (iswalpha(L'a'));
CHECK (!iswalpha(L'3'));
@@ -59,6 +58,7 @@ int main()
CHECK (iswxdigit(L'A'));
CHECK (!iswxdigit(0x1f48));
}
+#endif
exit (0);
}